[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: git: avoiding merges, rebasing
From: |
Eric Blake |
Subject: |
Re: git: avoiding merges, rebasing |
Date: |
Sun, 30 Sep 2007 06:43:14 -0600 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.6) Gecko/20070728 Thunderbird/2.0.0.6 Mnenhy/0.7.5.666 |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
According to Bruno Haible on 9/30/2007 6:21 AM:
> But I had to resolve the conflicts twice, which is inefficient. Any hint
> how to avoid that?
git rerere is supposed to be able to help with repeated rebase resolution
(git remembers how you resolved a conflict once, so you don't have to do
it again), but I haven't played with it much yet.
Also, newer git supports a per-file attribute for a diff resolution script
(man gitattributes). I haven't gotten time to try, but it should be
possible to create a custom [merge "cl-merge"] in your git config file,
which points to a script designed specifically for resolving changelog
conflicts (I'm always annoyed that the default git diff treats the
conflict as two hunks, instead of one; and a script could also be made
smart enough to play the hunks in date order). Then in
gnulib/.git/info/attributes (for personal use) or gnulib/.gitattributes
(for everyone's use, and you'd better distribute the cl-merge script), you
would set "ChangeLog merge=cl-merge", and git would automatically handle
ChangeLog history in a smarter manner.
- --
Don't work too hard, make some time for fun as well!
Eric Blake address@hidden
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFG/5nh84KuGfSFAYARAmhOAKDUgMIEl4v01V23tCRGCgBThj8a2QCbBjCW
r39GogtOyOoqWF8CdJEt2bg=
=LfQD
-----END PGP SIGNATURE-----