Re: Change behavior of git add --patch on newly added file?

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

 



Junio C Hamano <gitster@xxxxxxxxx> writes:

> Emily Shaffer <emilyshaffer@xxxxxxxxxx> writes:
>
>> Should 'git add -p <newly-added-file>' do the same thing as 'git add -N
>> <newly-added-file && git add -p <newly-added-file>'?
> ...
> Patches welcome, but you may want to check with Dscho as there is an
> effort going on to reimplement the entire "add -i" machinery in C.

Oh, having said all that, for a newly added file, all you have is a
hunk that is full of added lines and nothing else, so even 's'plit
interactive subcommand of "add -p" interface would not do anything.

So I am not sure if performing an implicit "add -N" upfront would
help your use case that much.  For that, you'd need to extend hunk
splitting UI a bit more, so that the user can split a hunk that only
adds lines into two at a desired point in the hunk.



[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