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

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

 



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
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux