Request: git add --interactive: split hunk: When can't split further, split on empty lines

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

 



When adding interactively, 's' can be used to split the current hunk.
Once it gets down to where 's' reports "Sorry, cannot split this
hunk", it could be useful if it would then start splitting based on
empty lines, probably leaving empty lines at the top of the split
hunks.  It certainly wouldn't be perfect, and might create many hunks,
but it would be a nice alternative to manually editing the hunk.
Certainly someone could still manually edit the hunk if they didn't
want to use it in a particular situation.

Example:

----------
int a() {
}

int b() {
}
----------

becomes

---------
int a() {
}
---------

int b() {
}
---------



[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