Re: [PATCH] git-add: introduce --edit (to edit the diff vs. the index)

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

 



Heya,

On Mon, Apr 13, 2009 at 18:19, Johannes Schindelin
<Johannes.Schindelin@xxxxxx> > Would not a much saner way be
>
>        $ git reset HEAD^
>        $ git add -p
>        $ git stash save --keep-index
>        # test it
>        $ git commit
>        $ git stash apply
>        # test again
>        $ git commit

That's what I do already, but now imagine that at the # test it step I
notice that I staged too much, or need to tweak some value only in
this commit (e.g., change test_expect_success to test_expect_failure
because this commit is the test that indicates the failure, and the
next one will fix it and flip from expect_failure to expect_success).
At the moment I have to make the change in my working directory (which
potentially involved deleting a lot of hunks), stage that and _then_
make my commit. With 'git add -e' I can make the fix and happily
continue.

-- 
Cheers,

Sverre Rabbelier
--
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]