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

[REGRESSION FIX 0/2] Handling regression introduced by a62387b

From
PKPeter Kaestle <peter.kaestle@nokia.com>
Date
Nov 3, 2020, 14:23 UTC
Message-ID
<1604413399-63090-1-git-send-email-peter.kaestle@nokia.com>

These two patches introduce a test case which triggers a regression introduced by a62387b3fc9f5aeeb04a2db278121d33a9caafa7 and a revert of the commit introducing the issue.

The test case reproduces following scenario:

Repository setup: superproject/middle_repo/inner_repo

Person A and B have both a clone of it, while Person B is not working with the inner_repo and thus does not have it initialized in his working copy.

Now person A does a change to the inner_repo and propagates it through the middle_repo and the superproject. Once person A pushed the changes, a "git fetch" on superproject level of person B will return with error saying:

Could not access submodule 'inner_repo'
Errors during submodule fetch:
        middle_repo

The revert was my quick approach to fix it. However as I'm not fully aware of what the idea was behind handling the submodules inside .git/modules instead of the worktree, I don't know whether this is the best solution. Maybe rethinking the whole get_next_submodule() algorithm or simply fixing the is_empty_dir() to use the worktree path will be a better solution.

best regards, --peter;

Peter Kaestle (2):
  submodules: test for fetch of non-init subsub-repo
  Revert "submodule.c: fetch in submodules git directory instead of in
    worktree"
 submodule.c                 | 14 ++++----------
 t/t5526-fetch-submodules.sh | 38 ++++++++++++++++++++++++++++++++++++++
 2 files changed, 42 insertions(+), 10 deletions(-)
-- 
2.6.2
Next: Peter Kaestle
Message 1 of 14 in “[REGRESSION FIX 0/2] Handling regression introduced by a62387b”
  1. Peter KaestleNov 3, 2020
  2. 1/2 submodules: test for fetch of non-init subsub-repoPeter Kaestle, Nov 3, 2020
  3. 2/2 Revert "submodule.c: fetch in submodules git directory instead of in worktree"Peter Kaestle, Nov 3, 2020
  4. 0/2 Handling regression introduced by a62387bPeter Kaestle, Nov 9, 2020
  5. 2/2 Revert "submodule.c: fetch in submodules git directory instead of in worktree"Peter Kaestle, Nov 9, 2020
  6. Johannes SchindelinNov 10, 2020
  7. 1/2 submodules: test for fetch of non-init subsub-repoPeter Kaestle, Nov 9, 2020
  8. Junio C HamanoNov 9, 2020
  9. Peter KästleNov 11, 2020
  10. Philip OakleyNov 11, 2020
  11. [RFCv2] submodules: fix of regression on fetching of non-init subsub-repoPeter Kaestle, Nov 12, 2020
  12. Philippe BlainNov 11, 2020
  13. Junio C HamanoNov 11, 2020
  14. Philippe BlainNov 11, 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.