Re: git init --separate-git-dir does not update symbolic .git links for submodules
- From
Stefan Beller <sbeller@google.com>
- Date
- Mar 6, 2017, 16:40 UTC
- Message-ID
- <CAGZ79kZbc394rmxYDUxCbysKNbEQCB7aLJkf6MGcCeXKAxiKhA@mail.gmail.com>
- In-Reply-To
- <1488636950.25023.2@smtp.yandex.ru>
On Sat, Mar 4, 2017 at 6:15 AM, Valery Tolstov <me@vtolstov.org> wrote:
> Looking for microproject ideas for GSoC. > Would this issue be suitable as the microproject?
It would be a good project, but not as 'micro' I would assume. ;) Why it is not a micro project:
To fix this issue we'd want to fix the .git link files recursively, i.e. nested submodules would also need fixing. And to recurse into submodules we normally spawn a child process.
So maybe the plan is as follow:
1) Add the functionality to builtin/submodule--helper.c
it fixes just one submodule, given by name.
2) add an externally visible command in the same file
See e.g. module_name (the function and the table
at the very end of the file)
(1) needs to call this command (see clone_submodule() in
that file how to call further commands)2) "git init --separate-git-dir ../test" would call the function in (1), which then recursively uses (2) to call (1) in nested submodules.
After thinking about it, it may be good for a micro project, as it is smaller than originally assumed. Specifically if you plan to look into submodules later on.
Thanks, Stefan