X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=lib%2Fgit-merge-changelog.c;h=652b40a72d1cc87bf417484f7109632d2ae55f6e;hb=b65bfcd7ba0be84de3d96f22103103f21679a721;hp=b9ab42947b2590b31d69544d566e1f6b04a90100;hpb=766d4f1de6c26bb084382524eaed00b45ab3112c;p=gnulib.git diff --git a/lib/git-merge-changelog.c b/lib/git-merge-changelog.c index b9ab42947..652b40a72 100644 --- a/lib/git-merge-changelog.c +++ b/lib/git-merge-changelog.c @@ -1,5 +1,5 @@ /* git-merge-changelog - git "merge" driver for GNU style ChangeLog files. - Copyright (C) 2008-2009 Bruno Haible + Copyright (C) 2008-2010 Bruno Haible This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -40,23 +40,52 @@ */ /* Installation: + $ gnulib-tool --create-testdir --dir=/tmp/testdir123 git-merge-changelog $ cd /tmp/testdir123 $ ./configure $ make $ make install - - Add to .git/config of the checkout (or to your $HOME/.gitconfig) the lines - [merge "merge-changelog"] - name = GNU-style ChangeLog merge driver - driver = /usr/local/bin/git-merge-changelog %O %A %B + Additionally, for git users: + - Add to .git/config of the checkout (or to your $HOME/.gitconfig) the + lines + + [merge "merge-changelog"] + name = GNU-style ChangeLog merge driver + driver = /usr/local/bin/git-merge-changelog %O %A %B + + - In every directory that contains a ChangeLog file, add a file + '.gitattributes' with this line: + + ChangeLog merge=merge-changelog + + (See "man 5 gitattributes" for more info.) - - In every directory that contains a ChangeLog file, add a file - '.gitattributes' with this line: + Additionally, for bzr users: + - Install the 'extmerge' bzr plug-in listed at + + + - Add to your $HOME/.bazaar/bazaar.conf the line - ChangeLog merge=merge-changelog + external_merge = git-merge-changelog %b %T %o + + - Then, to merge a conflict in a ChangeLog file, use + + $ bzr extmerge ChangeLog + + Additionally, for hg users: + - Add to your $HOME/.hgrc a couple of lines in a section [merge-tools]. + See section merge-tools + for reference. + */ - (See "man 5 gitattributes" for more info.) +/* Use as an alternative to 'diff3': + git-merge-changelog performs the same role as "diff3 -m", just with + reordered arguments: + $ git-merge-changelog %O %A %B + is comparable to + $ diff3 -m %A %O %B */ /* Calling convention: @@ -947,6 +976,7 @@ usage (int status) printf ("B-FILE-NAME names the user-modified file.\n"); printf ("Writes the merged file into A-FILE-NAME.\n"); printf ("\n"); + #if 0 /* --split-merged-entry is now on by default. */ printf ("Operation modifiers:\n"); printf ("\ --split-merged-entry Possibly split a merged entry between paragraphs.\n\ @@ -955,6 +985,7 @@ usage (int status) newline, just because they happened on the same\n\ date.\n"); printf ("\n"); + #endif printf ("Informative output:\n"); printf (" -h, --help display this help and exit\n"); printf (" -V, --version output version information and exit\n"); @@ -980,7 +1011,7 @@ main (int argc, char *argv[]) /* Set default values for variables. */ do_help = false; do_version = false; - split_merged_entry = false; + split_merged_entry = true; /* Parse command line options. */ while ((optchar = getopt_long (argc, argv, "hV", long_options, NULL)) != EOF) @@ -995,7 +1026,6 @@ main (int argc, char *argv[]) do_version = true; break; case CHAR_MAX + 1: /* --split-merged-entry */ - split_merged_entry = true; break; default: usage (EXIT_FAILURE);