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

Re: [PATCH 2/2] fetch, push: keep separate lists of submodules and gitlinks

From
Heiko Voigt <hvoigt@hvoigt.net>
Date
Oct 23, 2017, 14:12 UTC
Message-ID
<20171023141259.GB85043@book.hvoigt.net>
In-Reply-To
<20171019181109.27792-2-sbeller@google.com>
On Thu, Oct 19, 2017 at 11:11:09AM -0700, Stefan Beller wrote:
Show 24 quoted lines
> Currently when fetching we collect the names of submodules to be fetched
> in a list. As we also want to support fetching 'gitlinks, that happen to
> have a repo checked out at the right place', we'll just pretend that these
> are submodules. We do that by assuming their path is their name. This in
> turn can yield collisions between the name-namespace and the
> path-namespace. (See the previous test for a demonstration.)
> 
> This patch rewrites the code such that we treat the 'real submodule' case
> differently from the 'gitlink, but ok' case. This introduces a bit
> of code duplication, but gets rid of the confusing mapping between names
> and paths.
> 
> The test is incomplete as the long term vision is not achieved yet.
> (which would be fetching both the renamed submodule as well as
> the gitlink thing, putting them in place via e.g. git-pull)
> 
> Signed-off-by: Stefan Beller <sbeller@google.com>
> ---
> 
>  Heiko,
>  Junio,
> 
>  I assumed the code would ease up a lot more, but now I am undecided if
>  I want to keep arguing as the code is not stopping to be ugly. :)

So we are basically coming to the same conclusion? :) My previous fallback approach basically did the same but with the old architecture (without parallel fetch, ...) and was already ugly.

With the fallback on submodule default names approach we can keep most of the old functionality and keep the code that handles that minimal.

Since there is only a small (IMO quite unlikely) cornercase that could break peoples expectations I would like to have a look whether anyone even notices the behavioral change on next or master. If there are complaints we can still extend and add the two lists.

>  The idea is to treat submodule and gitlinks separately, with submodules
>  supporting renames, and gitlinks as a historic artefact.
>  
>  Sorry for the noise about code ugliness.

Why sorry? For me it is actually interesting to see you basically coming to the same conclusions.

Cheers Heiko
Previous: Stefan BellerNext: Stefan Beller
Message 18 of 24 in “implement fetching of moved submodules”
  1. 0/3 implement fetching of moved submodulesHeiko Voigt, Oct 16, 2017
  2. 1/3 fetch: add test to make sure we stay backwards compatibleHeiko Voigt, Oct 16, 2017
  3. Stefan BellerOct 17, 2017
  4. 3/3 submodule: simplify decision tree whether to or not to fetchHeiko Voigt, Oct 16, 2017
  5. Stefan BellerOct 17, 2017
  6. Junio C HamanoOct 18, 2017
  7. Brandon WilliamsOct 18, 2017
  8. Junio C HamanoOct 19, 2017
  9. Heiko VoigtOct 19, 2017
  10. Brandon WilliamsOct 19, 2017
  11. 2/3 implement fetching of moved submodulesHeiko Voigt, Oct 16, 2017
  12. Stefan BellerOct 17, 2017
  13. Junio C HamanoOct 18, 2017
  14. Stefan BellerOct 18, 2017
  15. Junio C HamanoOct 19, 2017
  16. 1/2 t5526: check for name/path collision in submodule fetchStefan Beller, Oct 19, 2017
  17. 2/2 fetch, push: keep separate lists of submodules and gitlinksStefan Beller, Oct 19, 2017
  18. Heiko VoigtOct 23, 2017
  19. Stefan BellerOct 23, 2017
  20. Junio C HamanoOct 24, 2017
  21. Heiko VoigtOct 23, 2017
  22. Stefan BellerOct 23, 2017
  23. Stefan BellerOct 19, 2017
  24. Junio C HamanoOct 17, 2017

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.