Re: [PATCHv3] git-rebase--interactive.sh: extend "edit" command to be more useful
- From
Kevin Ballard <kevin@sb.org>
- Date
- Dec 3, 2010, 10:14 UTC
- Message-ID
- <85DF30E1-E823-41D9-BAD7-4A11BD0D03C7@sb.org>
- In-Reply-To
- <20101203100059.GA12043@burratino>
On Dec 3, 2010, at 2:00 AM, Jonathan Nieder wrote:
Show 7 quoted lines
>> But most importantly, since $rest is echoed on the terminal, it MUST be >> derived from the recipe ($line). Rationale: I replace the commit subject >> in the recipe by a reminder what I intend to do when the "edit" command >> stops---I don't care so much what the commit subject is. > > Kevin, this sounds like a vote for the "replace commit message" output > format.
The v3 patch will emit both a description of the commit it stopped on, as well as the comment. The rationale for extracting the first line of HEAD is for when the user doesn't provide any comment - e.g. they just add "edit". It may be worth doing this only in that case, and if the user did provide a comment, emit it in place of the first line of HEAD.
Given the recipe
pick bc17bb7 git-rebase--interactive.sh: extend "edit" command to be more useful edit - foo
the edit command would print
Stopped at bc17bb7... git-rebase--interactive.sh: extend "edit" command to be more useful foo You can amend the commit now...
The alternative is to make that same recipe emit
Stopped at bc17bb7... foo You can amend the commit now...
I'm leaning towards making that change right now, but I'm not certain. Do either of you have a preference?
-Kevin Ballard