Re: Autosplit option for git add -p

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

 



Christian Couder <christian.couder@xxxxxxxxx> writes:

> It doesn't look like there is any option to do that. About
> implementing it, it depends if it would be a command line option or a
> config option.

Having these alone make no sense to me.

I'd suggest extending the lowest level (i.e. interactive prompt
response) first so that a stronger 's' splits all hunks in the
current file.  It might be sufficient for the use case.

On top of that, it happens to be that when changes to _all_ paths
want to be split, it may prove handy to also have a command line
option.

But the reason why I am hesitant to endorse a command line option
that splits everything is because:

 (1) it is dubious to expect the user to _know_ that it makes sense
     to split all changes before starting "add -p" (and friends).

 (2) if the user gives such an option and then in the interactive
     session regrets that it was too much to split all the hunks, it
     is unclear how the user can easily recover (there is no "merge
     all hunks back to the original" operation).






[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