git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Avery Pennarun <apenwarr@gmail.com>
To: Daniel Thomas <drt24@srcf.ucam.org>
Cc: Git Mailing List <git@vger.kernel.org>
Subject: Re: [GSoC Proposal/RFC] Rolling commit message writing
Date: Mon, 29 Mar 2010 16:31:00 -0400	[thread overview]
Message-ID: <32541b131003291331y3ae5ca23la33466d588c1b9e1@mail.gmail.com> (raw)
In-Reply-To: <alpine.DEB.1.00.1003281834520.13534@pip.srcf.ucam.org>

On Sun, Mar 28, 2010 at 3:32 PM, Daniel Thomas <drt24@srcf.ucam.org> wrote:
> Currently it is fairly easy to write good commit messages but the effort
> that this requires of developers can be reduced still further.
>
> This would be achieved by adding a built in system for working on a commit
> message during the stage of adding changes.
>
> Currently this can be done manually using "-F <file>, --file=<file>" in git
> commit but we can do better than that. Specifically changes to git add
> [--interactive | -i] to add an 'am' or similar command to allow adding a
> file and then prompting for a message about the changes to that file. Also
> changes to git add [--patch | -p] to add 'm' and 'c' options to git add
> --patch to allow the addition of a message for the current hunk ('m') and to
> do a commit (prompting for review) before returning to the hunk currently in
> focus ('c').

The extra prompting seems to me like it would slow down the process of
'git add -p' by making it take too many steps.  Normally when I create
a commit, I like to think of "which lines will I commit?" and "what is
the description of the whole commit?" as separate questions, whereas
this workflow would interweave the two and confuse me.

Do other people prefer it that way?

Secondly, I'm concerned that if you can't remember the description of
your entire commit by the time you commit it, then your commit is too
big.  The usual solution is to create multiple, smaller commits that
are easy to describe.  If at the end you find yourself with too many
commits, you can always join them together with git rebase.

You might also like 'git commit -v', which shows the actual diff to be
committed as part of your default commit message.  Then you can write
your message while looking at it, making it easy to describe exactly
what you changed.

Given these existing capabilities, is it still worth adding the
feature you propose?

Have fun,

Avery

  reply	other threads:[~2010-03-29 20:32 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-28 19:32 [GSoC Proposal/RFC] Rolling commit message writing Daniel Thomas
2010-03-29 20:31 ` Avery Pennarun [this message]
2010-03-30  3:05   ` Jonathan Nieder
2010-03-30  4:32     ` Avery Pennarun
2010-03-30  5:02       ` the careless committer and fear of commitment (rebase -i vs add -p) Jonathan Nieder
2010-03-30  6:14         ` Ramkumar Ramachandra
2010-03-30 17:27   ` [GSoC Proposal/RFC] Rolling commit message writing Jeff King
  -- strict thread matches above, loose matches on Subject: below --
2010-03-30 22:34 Daniel Thomas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=32541b131003291331y3ae5ca23la33466d588c1b9e1@mail.gmail.com \
    --to=apenwarr@gmail.com \
    --cc=drt24@srcf.ucam.org \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).