Re: [PATCH/RFC] commit: new option to abort -a something is already staged

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

 



A few quick corrections:

Jonathan Nieder wrote:

> I'm starting to lean toward having this on unconditionally, with a
> message that points the user who really doesn't want to clobber their

... who really *does* want to clobber their index ...

> index toward "git add -u", as a good idea.  I think that for humans,
> that would be okay and that configuration doesn't really help much
> for this.
>
> The remaining question becomes scripts.  A script might do
>
>	... modify old-file and create new-file ...
> 	git add new-file
> 	git commit -m "some great message"
>
> which would trip this error.  For that matter, humans might do that,
> too.  Could the check detect this case (where the only changes in the
> index are additions of new files) and treat it as non-destructive?

(where the only changes in the index are additions of new files *that
match the worktree*)

Sorry for the noise,
Jonathan



[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