Web lists-archives.com

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




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