From: Johan Herland Date: Thu, 27 Nov 2014 10:14:45 GMT Subject: Re: Re: Extended splitting for "git add --interactive" Message-ID: In-Reply-To: <5476F4FA020000A100018078@gwsmtp1.uni-regensburg.de> On Thu, Nov 27, 2014 at 9:55 AM, Ulrich Windl wrote: > I probably forgot to mention the obvious: My enhancement request was > for cases where git would reject so split a hunk. I don't want to > change the default split (if it finds a point to split). > So maybe call it a "2nd-level-split". Only if split refuses to split, > you could avoid using "edit" to manually split. > I know that in general such things can't be right, but you can > either reject the new hunks or use "edit". I just guessed the feature > could save some time on the average. FWIW, I would very much like a "2nd-level split" where it simply splits into individual lines. I think it's not worth trying to be extra clever about it. For your example, I'd simply want the following behavior: -AAA -BBB +CCC +DDD Stage this hunk? SPLIT -AAA Stage this hunk? YES -BBB Stage this hunk? NO +CCC Stage this hunk? YES +DDD Stage this hunk? NO This would allow me to stage the following: -AAA +CCC and leave the following unstaged: -BBB +DDD but would also allow any other combination. ...Johan -- Johan Herland, www.herland.net