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.
Relates to bug 34206
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.
(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:
(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.
Created attachment 48214 [details] first try First try, will run this locally for a few days to test before r?
Apparently we don't need all those .gitattributes, just one root level file, I'll fix that in a new patch
Created attachment 48227 [details] without all those gitattributes and changelogs
Created attachment 48871 [details] Patch
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).
Comment on attachment 48871 [details] Patch LGTM.
Landed in r54960
Added an entry to https://trac.webkit.org/wiki/UsingGitWithWebKit about this feature too.