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

Re: git init --separate-git-dir does not update symbolic .git links for submodules

From
Valery Tolstov <me@vtolstov.org>
Date
Mar 7, 2017, 18:59 UTC
Message-ID
<1488913150.8812.0@smtp.yandex.ru>

I think we can reuse code from module_clone that writes .git link. Possibly this code fragment needs to be factored out from module_clone

Also, to fix all the links, we need to obtain the list of submodules and then iterate over them. module_list command iterates and prints the result to stdout. Maybe we can reuse this output. Or create separate function that returns the list of submodules.

Can we call these functions from submodule--helper inside init command, or run them thorugh internal command interface?

In my opinion, make submodule--helper fully responsible for link fixes would be a good solution. Then we create two additional function, one that fixes all submodules on the current level, and another that fixes individual submodule. Although it looks good, I'm not quite sure that it's really good.

So, maybe we can do link fixes like this:
    1. Start fixing from init command using submodule--helper, with
       subcommand that fixes all submodules on current level
    2. Each submodule processed with another subcommand/function in
       submodule--helper individually
    3. Repeat for current submodule recursively
Glad to see your advices.
Regards,
  Valery Tolstov
Next: Stefan Beller
Message 1 of 2 in “Re: git init --separate-git-dir does not update symbolic .git links for submodules”
  1. Valery TolstovMar 7, 2017
  2. Stefan BellerMar 7, 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.