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

Re: [RFC 1/2] submodules: test for fetch of non-init subsub-repo

From
Philip Oakley <philipoakley@iee.email>
Date
Nov 11, 2020, 17:22 UTC
Message-ID
<4339e01e-d312-69ee-c810-2fbc65606b0d@iee.email>
In-Reply-To
<c4741382-5662-ac15-24da-218b28ae9dee@nokia.com>
minor readability comment,
On 11/11/2020 12:45, Peter Kästle wrote:
Show 18 quoted lines
> Here is my proposal for a new commit message of the test case:
>
> ----8<----
> A regression has been introduced by 'a62387b (submodule.c: fetch in
> submodules git directory instead of in worktree, 2018-11-28)'.
>
> The scenario in which it triggers is when one has a remote repository
> with a subrepository inside a subrepository like this:
> 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 introduces a change to the inner_repo and propagates it
> through the middle_repo and the superproject.
> Once person A pushed the changes and person B wants to fetch them
> using "git fetch" on superproject level, git

It's not obviously obvious which person is doing this final 'git' operation (it isn't attached to a particular person). Not sure if moving the comma, or saying ", B's 'git fetch' will.." is the right choice. The following sentences also feel as treating 'git' as person (trusted friend;-).

Show 17 quoted lines
> will return with error saying:
>
> Could not access submodule 'inner_repo'
> Errors during submodule fetch:
>         middle_repo
>
> Expectation is that in this case the inner submodule will be
> recognized as uninitialized subrepository and skipped by the git fetch
> command.
>
> This used to work correctly before 'a62387b (submodule.c: fetch in
> submodules git directory instead of in worktree, 2018-11-28)'.
>
> Starting with a62387b the code wants to evaluate "is_empty_dir()"
> inside .git/modules for a directory only existing in the worktree,
> delivering then of course wrong return value.
> ---->8----

-- Philip

Previous: Peter KästleNext: Peter Kaestle
Message 10 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.