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

Spurious warning when moving a file in presence of submodules

From
Matthieu Moy <matthieu.moy@grenoble-inp.fr>
Date
Oct 11, 2013, 14:29 UTC
Message-ID
<vpq38o7nao9.fsf@anie.imag.fr>
Hi,
I'm getting this warning:
  warning: Could not find section in .gitmodules where path=XXX

whenever I use "git mv" to move a file in a repository containing a submodule. The file is outside the submodule and is completely unrelated, so I do not understand the intent of the warning.

My understanding (without looking at the code in detail) is that Git tries to be clever about submodule renames, hence checks whether the source file is a submodule. But then if the lookup fails, it should just silently move on to "normal file move" mode I guess...

-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/
Next: Jens Lehmann
Message 1 of 8 in “Spurious warning when moving a file in presence of submodules”
  1. Matthieu MoyOct 11, 2013
  2. Jens LehmannOct 11, 2013
  3. mv: Fix spurious warning when moving a file in presence of submodulesJens Lehmann, Oct 13, 2013
  4. Matthieu MoyOct 13, 2013
  5. Jens LehmannOct 13, 2013
  6. Jonathan NiederOct 14, 2013
  7. Matthieu MoyOct 14, 2013
  8. Jonathan NiederOct 17, 2013

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.