Re: yet another git trick

2008-05-29 Thread Bruno Haible
Paolo Bonzini wrote: > Strange, the script never adds spaces, all it does on ChangeLog lines is > "s/^ //p" and "s/^+//p". ... on the output of "git diff". But "git diff", for me, produces context-diffs, not unified diffs, so the script would need to do "s/^ //p" and "s/^+ //p". Bruno

Re: yet another git trick

2008-05-29 Thread Paolo Bonzini
It did fetch the newest ChangeLog correctly. But it adds a space before each line of the ChangeLog entry. Tab after space - that does not smell good. Strange, the script never adds spaces, all it does on ChangeLog lines is "s/^ //p" and "s/^+//p". Also, since the gitweb summary view shows

Re: yet another git trick

2008-05-28 Thread Bruno Haible
Paolo Bonzini wrote: > Drop it in .git/hooks/prepare-commit-msg and make it executable! How do I abort a commit then? Without this hook, when I quit the editor without saving I got: fatal: no commit message? aborting commit. With the hook installed, it creates the commit. No way to abort! Br

Re: yet another git trick

2008-05-28 Thread Bruno Haible
Hallo Paolo, > Personally, I think this is a good alternative to making ChangeLog files > automatically from the VCS logs. > > Drop it in .git/hooks/prepare-commit-msg and make it executable! Interesting idea! When I try your script, after adding a ChangeLog entry, it shows me an editor buffer

Re: yet another git trick

2008-05-28 Thread Jim Meyering
Paolo Bonzini <[EMAIL PROTECTED]> wrote: > Newer versions of git have my patch for a prepare-commit-msg hook. > The hook modifies the commit message before it is shown in the editor. > This implementation of the hook does two things, which I found useful > for GNU projects: 1) build a commit messag

yet another git trick

2008-05-28 Thread Paolo Bonzini
Newer versions of git have my patch for a prepare-commit-msg hook. The hook modifies the commit message before it is shown in the editor. This implementation of the hook does two things, which I found useful for GNU projects: 1) build a commit message template based on modified ChangeLog file