Hello all, In the series of mail exchanges between me, Junio and Phillipe: https://lore.kernel.org/git/20210207144144.GA42182@konoha/ The outcome of the BUG(?) reported by Javier Mora in the following mail: https://lore.kernel.org/git/ea91c2ea29064079914f6a522db5115a@xxxxxxxxxxxxxxxxxxxx/ Was not fully decided (i.e., whether it should be fixed or not) due to the potential "pollution" of the 'git rm' command. Here is my patch series attempting to fix the situation reported by Javier and make sure that doing a 'git rm --cached <submodule>' deletes the entry of the submodule in question from the '.gitmodules'. I have tried to keep the changes as precise as possible without adding much extra stuff. Reviews and comments are appreciated. Thank you Phillipe, Junio and Christian for their comments on the patch. Regards, Shourya Shukla Shourya Shukla (2): rm: changes in the '.gitmodules' are staged after using '--cached' t3600: amend test 46 to check for '.gitmodules' modification builtin/rm.c | 48 +++++++++++++++++++++++++++--------------------- t/t3600-rm.sh | 7 +++---- 2 files changed, 30 insertions(+), 25 deletions(-) -- 2.25.1