Re: [PATCH v2 1/1] rm: stage submodule removal from '.gitmodules' when using '--cached'

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

 



Shourya Shukla <periperidip@xxxxxxxxx> writes:

>> Doing so would also mean that you should not have the caller call
>> stage_updated_gitmodules() at all, even in !index_only case.
>> Imagine if the .gitmodules file in the working tree had local
>> changes (e.g. registered a few more submodules, or updated the url
>> field of a few submodules) that are not yet added to the index when
>> "git rm" removed a submodule.  The user does not want them to be in
>> the index yet and "git rm" should not add these unrelated local
>> changes to the index.
>
> Won't this be deviating from the current behaviour of 'git rm'?
> Currently, the above case won't process and the user will be asked to
> stage or undo the mods they made before moving forward.

Ah, adding such safety to ensure that "rm" without "--cached"
(i.e. update both the index and the working tree copies of
.gitmodules) would stop when .gitmodules has a local mod would be a
good idea, on top of the outline you are responding to, I think.

Thanks.



[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