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

[PATCH 0/1] Test case for checkout of added/deleted submodules in clones

From
Luke Diamand <luke@diamand.org>
Date
Sep 21, 2020, 08:15 UTC
Message-ID
<20200921081537.15300-1-luke@diamand.org>

I hit some quite confusing (to me anyway) corner cases in `git submodule` handling of checking out revisions where submodules have been added or removed.

If you clone a repo with an "old" submodule which is missing from HEAD, and then try to checkout an older revision, you can sometimes get:

    fatal: not a git repository: ../.git/modules/old
    fatal: could not reset submodule index

If you clone a repo with a "new" submodule, and then checkout an older revision where it is deleted, you can sometimes find that new submodule is left lying around.

Luke Diamand (1):
  Test case for checkout of added/deleted submodules in clones
 t/t5619-submodules-missing.sh | 104 ++++++++++++++++++++++++++++++++++
 1 file changed, 104 insertions(+)
 create mode 100755 t/t5619-submodules-missing.sh
-- 
2.28.0.762.g324f61785e
Next: Luke Diamand
Message 1 of 4 in “Test case for checkout of added/deleted submodules in clones”
  1. 0/1 Test case for checkout of added/deleted submodules in clonesLuke Diamand, Sep 21, 2020
  2. 1/1 Test case for checkout of added/deleted submodules in clonesLuke Diamand, Sep 21, 2020
  3. Kaartic SivaraamSep 22, 2020
  4. Philippe BlainSep 22, 2020

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.