git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Junio C Hamano <gitster@pobox.com>
Date
Feb 7, 2021, 19:34 UTC
Message-ID
<xmqqwnvj7jty.fsf@gitster.c.googlers.com>
In-Reply-To
<xmqq1rdr8yl2.fsf@gitster.c.googlers.com>
Junio C Hamano <gitster@pobox.com> writes:
Show 15 quoted lines
> Shourya Shukla <periperidip@gmail.com> writes:
>
>> 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.
Show 9 quoted lines
>
>> 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.
Previous: Junio C HamanoNext: Shourya Shukla
Message 3 of 6 in “[RFC] [BUDFIX] 'git rm --cached <submodule>' does not stage the changed .gitmodules”
  1. Shourya ShuklaFeb 7, 2021
  2. Junio C HamanoFeb 7, 2021
  3. Junio C HamanoFeb 7, 2021
  4. Shourya ShuklaFeb 8, 2021
  5. Junio C HamanoFeb 8, 2021
  6. Philippe BlainFeb 9, 2021

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.