Thread (47 messages) flat view 47 messages, 8 authors, 2016-06-15

Re: [RFC PATCH] git-add--interactive: manual hunk editing mode v2.1

From: Jeff King <hidden>
Date: 2016-06-15 22:44:40

On Sun, Jun 01, 2008 at 04:50:00PM +0200, Thomas Rast wrote:
Adds a new option 'e' to the 'add -p' command loop that lets you
edit the current hunk in your favourite editor.
I haven't had time to review your patch yet, but I'll hopefully get to
it in the next day or so. In the meantime, a quick comment on this
change:
-			   $ix < (scalar @$hunks)-2 ? @$hunks[$ix+1..@$hunks] : ()) {
+			   $ix < (scalar @$hunks)-1 ? @$hunks[$ix+1..@$hunks-1] : ()) {
An easier and less error prone way to write "@$hunks-1" is "$#{$hunks}".
As a side note, what's the "right" way to deal with this situation of
patch improvements?  I made a normal commit chain on a side branch to
keep the history, but format-patch wants to make that into two mails,
so I had to rebuild the message format from diff -p --stat.
Usually you would squash your changes together into a single commit
locally using "commit --amend" or "rebase -i".

-Peff
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help