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

FW: Bug Report: changes to submodule's files can be silently lost forever

From
TYTim Yorke <tyorke@visionrt.com>
Date
Jan 21, 2021, 13:48 UTC
Message-ID
<PA4PR08MB60967539EC75C9AACC4C46A5A9A10@PA4PR08MB6096.eurprd08.prod.outlook.com>
In-Reply-To
<PA4PR08MB60969AFFD0607BDBE3ACBBE6A9A10@PA4PR08MB6096.eurprd08.prod.outlook.com>

Thank you for filling out a Git bug report! Please answer the following questions to help us understand your issue. What did you do before the bug happened? (Steps to reproduce your issue)

- I used the command "git config submodule.recurse true" in my top-level repository
- made a change to a file in a submodule (located within my top-level repository)
- performed a git checkout in the top-level repository to a commit that didn't have the submodule
- performed a git checkout in the top-level repository back to a commit that does have the submodule
What did you expect to happen? (Expected behavior)
When attempting the first checkout (i.e. to a commit without the submodule), I'd expect an warning telling me that the submodule was not up-to-date (uncommited changes). 
What happened instead? (Actual behavior)
The changes to the file in the submodule were lost forever without any warning
What's different between what you expected and what actually happened?
My uncommitted changes were silently lost forever, whereas I'd expect either 
- to be warned before I could continue or
- the uncommited changes to be retained.
Anything else you want to add:

Please review the rest of the bug report below. You can delete any lines you don't wish to share.

[System Info] git version: git version 2.29.2.windows.2 cpu: x86_64 built from commit: 3464b98ce6803c98bf8fb34390cd150d66e4a0d3 sizeof-long: 4 sizeof-size_t: 8 shell-path: /bin/sh uname: Windows 10.0 21292 compiler info: gnuc: 10.2 libc info: no libc information available $SHELL (typically, interactive shell): <unset>

[Enabled Hooks]
Next: Philippe Blain
Message 1 of 2 in “FW: Bug Report: changes to submodule's files can be silently lost forever”
  1. Tim YorkeJan 21, 2021
  2. Philippe BlainJan 21, 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.