RESOLVED FIXED 28721
WebKit needs a git-merge-changelogs
https://bugs.webkit.org/show_bug.cgi?id=28721
Summary WebKit needs a git-merge-changelogs
Eric Seidel (no email)
Reported 2009-08-25 15:25:42 PDT
WebKit needs a git-merge-changelogs Git has the ability to specify custom merge drivers on a per-file basis. See "man gitattributes" or http://www.kernel.org/pub/software/scm/git/docs/gitattributes.html for more information. the gnu folks over at gnulib have already written a git-merge-changelog: http://cyberelk.net/tim/2008/05/29/git-merge-changelog/ Sadly, it's in C, and has a bunch of dependencies on gnu stuff. It's also GPL'd. Another kink is that although it's possible to edit the root ".gitattributes" file and check in a mapping from "ChangeLog" to a specific merge driver, merge drivers have to be defined in a git config file, which must be either in .git/config or ~/.gitconfig. :( So we'd have to have an installer to set up using a git-merge-changelog script if we wrote one. That should be easy since "git config" already handles reading/writing from .git/config files nicely. I looked briefly at writing this today. The merge driver is passed paths to 3 temp files. 1. previous version 2. other branch version. 3. this branch version. Maybe one of the other WebKit git users will get further than I did.
Attachments
first try (27.81 KB, patch)
2010-02-05 02:14 PST, Tor Arne Vestbø
no flags
without all those gitattributes and changelogs (5.80 KB, patch)
2010-02-05 05:41 PST, Tor Arne Vestbø
no flags
Patch (5.13 KB, patch)
2010-02-17 01:47 PST, Tor Arne Vestbø
eric: review+
Tor Arne Vestbø
Comment 1 2010-01-27 01:58:47 PST
Relates to bug 34206
Tor Arne Vestbø
Comment 2 2010-01-28 02:08:27 PST
I'll start looking at this now, if anyone has made any progress please post patches here. I don't think the bootstrapping-part would be too much trouble, ie telling people do do 'git config merge.changelog.name Foo' or running an install-script, since most of our tools are already wrapper-scripts or helper-scripts that require knowledge about their existence and how to use them, ie they are not "automatic" in any way.
Chris Jerdonek
Comment 3 2010-01-28 02:11:22 PST
(In reply to comment #2) > I'll start looking at this now, if anyone has made any progress please post > patches here. > > I don't think the bootstrapping-part would be too much trouble, ie telling > people do do 'git config merge.changelog.name Foo' or running an > install-script, since most of our tools are already wrapper-scripts or > helper-scripts that require knowledge about their existence and how to use > them, ie they are not "automatic" in any way. Thanks, Tor! FYI, we are already telling people to do a few "git config" statements-- http://trac.webkit.org/wiki/UsingGitWithWebKit#WebKitScriptsupportforGit so I'm sure that adding another one or two won't hurt -- as they are already familiar with doing that:
David Kilzer (:ddkilzer)
Comment 4 2010-01-29 16:29:24 PST
(In reply to comment #2) > I'll start looking at this now, if anyone has made any progress please post > patches here. I thought I had a local branch with some related changes, but it seems that I do not. Sorry.
Tor Arne Vestbø
Comment 5 2010-02-05 02:14:45 PST
Created attachment 48214 [details] first try First try, will run this locally for a few days to test before r?
Tor Arne Vestbø
Comment 6 2010-02-05 05:21:47 PST
Apparently we don't need all those .gitattributes, just one root level file, I'll fix that in a new patch
Tor Arne Vestbø
Comment 7 2010-02-05 05:41:01 PST
Created attachment 48227 [details] without all those gitattributes and changelogs
Tor Arne Vestbø
Comment 8 2010-02-17 01:47:57 PST
Tor Arne Vestbø
Comment 9 2010-02-17 01:50:11 PST
Note that if the user has not defined merge.changelog.driver, git is going to ignore the .gitattribute instruction and just try to merge it itself, so there won't be any "missing driver" messages (as far as I know).
Eric Seidel (no email)
Comment 10 2010-02-17 10:15:55 PST
Comment on attachment 48871 [details] Patch LGTM.
Tor Arne Vestbø
Comment 11 2010-02-18 07:52:16 PST
Landed in r54960
Tor Arne Vestbø
Comment 12 2010-02-18 07:56:19 PST
Added an entry to https://trac.webkit.org/wiki/UsingGitWithWebKit about this feature too.
Note You need to log in before you can comment on or make changes to this bug.