bug-gnulib
[Top][All Lists]
Advanced

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

Re: git commit -a -m'avoid an unnecessary sub-shell'


From: Eric Blake
Subject: Re: git commit -a -m'avoid an unnecessary sub-shell'
Date: Tue, 04 Jan 2011 11:29:30 -0700
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.13) Gecko/20101209 Fedora/3.1.7-0.35.b3pre.fc14 Lightning/1.0b3pre Mnenhy/0.8.3 Thunderbird/3.1.7

On 01/04/2011 11:23 AM, Bruce Korb wrote:
> On 01/04/11 10:12, Jim Meyering wrote:
>> Hmm... I see you didn't push the same commit I suggested.
> 
> Hmmm.  I'm sorry.  I actually clipped your change log and
> copied what I had done previously for the actual fix.
> I didn't notice we'd patched it differently.
> 
> RE:
>> It's a good policy to prefix the one-line summary with "module-name: ",
> 
> meaning to add "git-version-gen: " or "git-version-gen:\n" to the "-m" text?

Exactly.  A good commit message looks like:

> module: one-line summary
> 
> additional comments, if appropriate
> 
> * file: changelog style entries

where the summary makes it easy to pick out which module was modified, a
blank line separates the summary and anything else (otherwise tools like
'git shortlog' try to include the additional comments as part of the
summary), and where the changelog could be reconstructed from the git
commits (we don't enforce this last aspect on gnulib.git, since we
maintain ChangeLog directly in git, but it is a requirement on
coreutils.git, since ChangeLog is generated from the git log, so I'm in
the habit of doing it in both projects).

Given that a good commit message occupies multiple lines, using 'git
commit -m' becomes tedious, and I start to prefer tools like Jim's
vc-dwim tool for creating good git commit messages.
http://www.gnu.org/software/vc-dwim/

-- 
Eric Blake   address@hidden    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]