Re: On removing files and "git-rm is pointless"

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

 



Junio C Hamano wrote:

> Nicolas Pitre <nico@xxxxxxx> writes:
> 
>> I think what Linus is proposing makes tons of sense.
>>
>> If you do git rm by mistake then you can always do git checkout on that
>> file to get it back.
>>
>> If you modified it so it doesn't match the index then git rm won't do
>> anything by default so you have a chance to think a bit more.
>>
>> If you updated the index, didn't commit anything but then do git rm then
>> you certainly wanted to really rm the file.
> 
> FWIW, I too am in favor of the proposed fix to "git rm" as Linus
> outlined.

+1. I'm also for this change. Of course if the working area version doesn't
match HEAD version git-rm should remove only index entry, and print warning
message, for example what it does now, i.e.
  rm '<filename>'
or if we want more chatty version (core.gitgor = true) it would print:
  File '<filename>' changed. Use "rm '<filename>'" to remove.
(or something like that).

-- 
Jakub Narebski
Warsaw, Poland
ShadeHawk on #git


-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[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]