Re: [RFC PATCH v2 3/3] Implement unstage --patch and discard --patch

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

 



On Fri, Jul 24, 2009 at 6:24 PM, Thomas Rast<trast@xxxxxxxxxxxxxxx> wrote:
> This implements a new optional argument --patch=<mode> in the
> git-add--interactive helper.  The modes are:
>
> 'stage' (default, as before): offer hunks from 'git diff' and stage
>  the ones selected by the user.
>
> 'unstage': offer hunks from 'git diff --cached', and unstage the ones
>  selected.
>
> 'discard': offer hunks from 'git diff', and discard (i.e., undo the
>  edit in the working tree) the ones selected.
>
> With this in hand, we can then easily add a --patch option to the
> git-unstage and git-discard scripts that run git-add--interactive in
> the corresponding modes.
>

While I do not really think even more git commands are so helpful, I
like the proposed command names, and I really like that it would be
possible to remove single hunks from the index. I have come to rely
very much on git add -p to make self-contained and clear commits and
think it would be a great feature if I could use this the other way
round too.


Thanks,
Matthias
--
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]