Re: Please support add -p with a new file, to add only part of the file
From: Jeff King <hidden>
Date: 2016-06-15 22:52:46
On Tue, Jan 10, 2012 at 11:33:39AM -0800, Junio C Hamano wrote:
Jeff King [off-list ref] writes:quoted
quoted
Even if you start with "add -N", there won't be individual "hunks" you can pick and choose from diffing emptiness and the whole new file, so you end up using "edit hunk" interface.I don't think the main impetus for this is that people necessarily want to pick and choose hunks from added files.Well, read the subject of your e-mail and tell me what it says ;-)
Heh. Oops.
Yes, I agree that "add -p" is not especially useful for that case, and
the workflow I was describing is very different[1].
Sorry for the noise.
-Peff
[1] For the record, I _do_ find myself using "git add -N" so that new
files can be part of my "git add -p" workflow. So that feature is
working as intended. It would save me a little bit of effort,
though, if I could tell git I also want to include untracked files
during the "-p" session, and dispense with the earlier "add -N".
I'd also find it useful to mark conflicts as resolved, but I think
we discussed that once before and you brought up some ugly corner
cases.