Re: git: avoiding merges, rebasing

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sep 30, 2007, at 10:27 PM, Benoit SIGOURE wrote:

On Sep 30, 2007, at 9:41 PM, Bruno Haible wrote:

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 would love such a script, instead of constantly having to do conflict
resolution at the top of ChangeLog.


So would I. I've had this in my TODO list for a long time so if no one else is willing to give it a try, I can try, but it won't be before next week because my schedule is quite busy until then.


I finally found some time to hack something and here is my git-merge- changelog Perl script. I tested it quickly and it seems to work fine. It will mess up the ChangeLog entries when a commit actually modifies an existing ChangeLog entry. It needs more testing but I'm just throwing this out in the wild for people that have interest in this to review. I will eventually come up with a solution for the commits modifying existing entries and a testsuite.

I'm CC-ing the Git ML just in case it interests some more people over there.

In order to use it, add the following to your ~/.gitconfig:
[merge "cl-merge"]
        name = GNU-style ChangeLog merge driver
        driver = /path/to/git-merge-changelog %O %A %B
(you can also add it to a specific working copy by adding it in .git/ config instead)

Then, in the directory where the ChangeLog is, add a .gitattributes file with the following content:
ChangeLog       merge=cl-merge

For more information, see man gitattributes.

Let me know if something goes wrong.

Cheers,

--
Benoit Sigoure aka Tsuna
EPITA Research and Development Laboratory


Attachment: PGP.sig
Description: This is a digitally signed message part


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux