This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: git vs ChangeLog


Hi!

On Thu, 26 Jul 2012 14:57:41 -0700 (PDT), Roland McGrath <roland@hack.frob.com> wrote:
> Mark Wielaard has a handy blog entry describing how to use gnulib's
> git-merge-changelog tool to make 'git rebase' and 'git merge' far
> less annoying when dealing with ChangeLog files:
> 
> http://gnu.wildebeest.org/blog/mjw/2012/03/16/automagically-merging-changelog-files-with-mercurial-or-git/

As Petr Baudis noted, a similar write-up is already present at
<http://sourceware.org/glibc/wiki/GlibcGit#ChangeLogs>.  I now added a
link to Mark's.


> Also, I personally use the two attached scripts so that 'git show-gnu'
> is the handy way to produce the standard format for posting a patch
> once you've done a git commit on a local branch.

I added a link to
<http://sourceware.org/glibc/wiki/Contribution%20checklist#Properly_Formatted_GNU_ChangeLog>.


I use the following patch to make this work for Âgit config --global
diff.noprefix true (which removes the Âa/Â, Âb/ prefixes that Git uses
when showing diffs, and which I have no idea what they might be useful
for, apart from making copy'n'paste of such filenames more difficult).

diff --git command/git-show-gnu command/git-show-gnu
index bc8982e..dcbbd18 100755
--- command/git-show-gnu
+++ command/git-show-gnu
@@ -2,8 +2,8 @@
 
 git show -b ${1+"$@"} | extract-changelog-from-diff
 git show --pretty=format: ${1+"$@"} |
-filterdiff --exclude='*/ChangeLog*' |
-sed '/^diff --git.*\/ChangeLog.*/{
+filterdiff --exclude='ChangeLog*' --exclude='*/ChangeLog*' |
+sed '/^diff --git.*[/ ]ChangeLog.*/{
 N
 d
 }'

Also, there is an additional blank line between the ChangeLog block and
the diff.

And, one could think about using Âfilterdiff --clean instead of the sed
invocation.


GrÃÃe,
 Thomas

Attachment: pgp00000.pgp
Description: PGP signature


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]