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

Fwd: Git Submodule Misbehaviour With ./

From
ATAndrei Thorp <garoth@gmail.com>
Date
Feb 24, 2009, 23:56 UTC
Message-ID
<80055d7c0902241556s4d24285bqd171275f58bdb37d@mail.gmail.com>
In-Reply-To
<80055d7c0902241541o5c8fad50ra4eace5919bcf6df@mail.gmail.com>
Hello,

Git (I have version 1.6.1.3) seems to misbehave when it comes to git submodule add and ./. Here is an example.

================================================ $ cd Configs $ git submodule add git@git.mercenariesguild.net:obvious.git ./awesome/obvious Initialized empty Git repository in /home/garoth/Configs/awesome/obvious/.git/ stdin: is not a tty remote: Counting objects: 32, done. remote: Compressing objects: 100% (29/29), done. Receiving objects: 100% (32/32), 5.10 KiB, done. remote: Total 32 (delta 8), reused 0 (delta 0) Resolving deltas: 100% (8/8), done. $ git submodule init No submodule mapping found in .gitmodules for path 'awesome/obvious' $ git commit -m "Added obvious submodule" $ cd ~/Desktop $ git clone ~/Configs $ git submodule init No submodule mapping found in .gitmodules for path 'awesome/obvious' ================================================

Note how when I did git submodule add, I used ./awesome/obvious. The behaviour of "No submodule mapping found in .gitmodules for path 'awesome/obvious'" only occurs when you use ./. If I were to use:

$ git submodule add git@git.mercenariesguild.net:obvious.git awesome/obvious

instead, then git handles everything just fine. Thanks to dsal in #git for helping me figure this out. Perhaps there is an error with regards to how the .gitmodules file is parsed or encoded. I'm not really a git developer, but I wanted to have this issue documented at least somewhere.

Thanks,
-Andrei Thorp
Next: Michael J Gruber
Message 1 of 35 in “Fwd: Git Submodule Misbehaviour With ./”
  1. Andrei ThorpFeb 24, 2009
  2. 0/2 Fix git submodule add for paths with ./Michael J Gruber, Feb 25, 2009
  3. 1/2 git submodule: Add test cases for git submodule addMichael J Gruber, Feb 25, 2009
  4. 2/2 git submodule: Fix adding of submodules at paths with ./Michael J Gruber, Feb 25, 2009
  5. Johannes SixtFeb 25, 2009
  6. Michael J GruberFeb 25, 2009
  7. Johannes SixtFeb 25, 2009
  8. 0/4 Fix git submodule add for funky pathsMichael J Gruber, Feb 25, 2009
  9. 1/4 git submodule: Add test cases for git submodule addMichael J Gruber, Feb 25, 2009
  10. 2/4 git submodule: Fix adding of submodules at paths with ./Michael J Gruber, Feb 25, 2009
  11. 3/4 git submodule: Add more tests for add with funky pathsMichael J Gruber, Feb 25, 2009
  12. 4/4 git submodule: Fix handling of // and /.. in paths for added submodulesMichael J Gruber, Feb 25, 2009
  13. Johannes SixtFeb 25, 2009
  14. Michael J GruberFeb 25, 2009
  15. Johannes SixtFeb 25, 2009
  16. Junio C HamanoFeb 25, 2009
  17. Michael J GruberFeb 26, 2009
  18. Junio C HamanoFeb 26, 2009
  19. 0/2 git submodule: normalize paths before addingMichael J Gruber, Mar 3, 2009
  20. 1/2 git submodule: Add test cases for git submodule addMichael J Gruber, Mar 3, 2009
  21. 2/2 git submodule: Fix adding of submodules at paths with ./, .. and //Michael J Gruber, Mar 3, 2009
  22. Johannes SixtMar 3, 2009
  23. Michael J GruberMar 3, 2009
  24. 0/2 git submodule: normalize paths before addingMichael J Gruber, Mar 3, 2009
  25. 1/2 git submodule: Add test cases for git submodule addMichael J Gruber, Mar 3, 2009
  26. 2/2 git submodule: Fix adding of submodules at paths with ./, .. and //Michael J Gruber, Mar 3, 2009
  27. Johannes SixtMar 3, 2009
  28. Michael J GruberMar 3, 2009
  29. Junio C HamanoMar 3, 2009
  30. Junio C HamanoMar 3, 2009
  31. Michael J GruberMar 3, 2009
  32. Johannes SchindelinMar 3, 2009
  33. Michael J GruberMar 3, 2009
  34. Junio C HamanoFeb 25, 2009
  35. Junio C HamanoFeb 25, 2009

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.