Thread (1 message) 1 message, 1 author, 2021-02-07

Re: [RFC] [BUDFIX] 'git rm --cached <submodule>' does not stage the changed .gitmodules

From: Junio C Hamano <hidden>
Date: 2021-02-07 19:35:49

Junio C Hamano [off-list ref] writes:
Shourya Shukla [off-list ref] writes:
quoted
So, my question is, do we need to fix this to make sure that the changed
'.gitmodules' is staged?
When "--cached" is given, the user is asking the module to be
removed ONLY from the index, without removing it from the working
tree, no?

So I think ".gitmodules" in the working tree should not be touched
at all.

Removing the entry for the module from the ".gitmodules" registered
in the index, when a submodule registered in the index, might be
desirable, and what you say here
typofix: "registered in the index IS REMOVED, might be" is what I meant.
quoted
And its entry is not removed from the file. What should be done about
this? I would appreciate your opinions.
may be related to it.

But I doubt it is a good idea to let "git rm" be the one touching
".gitmodules" either in the index or in the working tree for that to
happen.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help