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

Re: [PATCH 7/9] submodule: migrate get_next_submodule to use repository structs

From
JTJonathan Tan <jonathantanmy@google.com>
Date
Dec 5, 2018, 00:17 UTC
Message-ID
<20181205001736.72764-1-jonathantanmy@google.com>
In-Reply-To
<20181129002756.167615-8-sbeller@google.com>
Show 7 quoted lines
> We used to recurse into submodules, even if they were broken having
> only an objects directory. The child process executed in the submodule
> would fail though if the submodule was broken. This is tested via
> "fetching submodule into a broken repository" in t5526.
> 
> This patch tightens the check upfront, such that we do not need
> to spawn a child process to find out if the submodule is broken.

Thanks, patches 4-7 look good to me - I see that you have addressed all my comments. Not sending one email each for patches 4, 5, and 6 - although I have commented on all of them, my comments were minor.

My more in-depth review was done on a previous version [1], and I see that my comments have been addressed. Also, Stefan says [2] (and implements in this patch):

Show 12 quoted lines
> > > If the working tree directory is empty for that submodule, it means
> > > it is likely not initialized. But why would we use that as a signal to
> > > skip the submodule?
> >
> > What I meant was: if empty, skip it completely. Otherwise, do the
> > repo_submodule_init() and repo_init() thing, and if they both fail, set
> > spf->result to 1, preserving existing behavior.
> 
> I did it the other way round:
> 
> If repo_[submodule_]init fails, see if we have a gitlink in tree and
> an empty dir in the FS, to decide if we need to signal failure.
This works too.

[1] https://public-inbox.org/git/20181017225811.66554-1-jonathantanmy@google.com/ [2] https://public-inbox.org/git/CAGZ79kbNXD35ZwevjLZcrGsT=2hNcUPmVUWvP1RjsKSH0Gd3ww@mail.gmail.com/

Previous: Stefan BellerNext: Jonathan Nieder
Message 10 of 21 in “[PATCHv2 0/9] Resending sb/submodule-recursive-fetch-gets-the-tip”
  1. Stefan BellerNov 29, 2018
  2. 1/9 sha1-array: provide oid_array_filterStefan Beller, Nov 29, 2018
  3. 2/9 submodule.c: fix indentationStefan Beller, Nov 29, 2018
  4. 3/9 submodule.c: sort changed_submodule_names before searching itStefan Beller, Nov 29, 2018
  5. Jonathan TanDec 5, 2018
  6. 4/9 submodule.c: tighten scope of changed_submodule_names structStefan Beller, Nov 29, 2018
  7. 5/9 submodule: store OIDs in changed_submodule_namesStefan Beller, Nov 29, 2018
  8. 6/9 repository: repo_submodule_init to take a submodule structStefan Beller, Nov 29, 2018
  9. 7/9 submodule: migrate get_next_submodule to use repository structsStefan Beller, Nov 29, 2018
  10. Jonathan TanDec 5, 2018
  11. Jonathan NiederFeb 2, 2019
  12. 8/9 submodule.c: fetch in submodules git directory instead of in worktreeStefan Beller, Nov 29, 2018
  13. Jonathan TanDec 5, 2018
  14. 9/9 fetch: try fetching submodules if needed objects were not fetchedStefan Beller, Nov 29, 2018
  15. Jonathan TanDec 5, 2018
  16. fetch: ensure submodule objects fetchedStefan Beller, Dec 6, 2018
  17. Junio C HamanoDec 9, 2018
  18. Junio C HamanoDec 5, 2018
  19. Stefan BellerDec 6, 2018
  20. Josh SteadmonDec 7, 2018
  21. Jonathan NiederJan 15, 2019

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.