From: Valery Tolstov <me@vtolstov.org>
To: sbeller@google.com
Cc: git@vger.kernel.org, gitster@pobox.com, me@vtolstov.org, sven@cs-ware.de
Subject: Re: git init --separate-git-dir does not update symbolic .git links for submodules
Date: Tue, 07 Mar 2017 21:59:10 +0300 [thread overview]
Message-ID: <1488913150.8812.0@smtp.yandex.ru> (raw)
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 reply other threads:[~2017-03-07 19:35 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-07 18:59 Valery Tolstov [this message]
2017-03-07 19:59 ` git init --separate-git-dir does not update symbolic .git links for submodules Stefan Beller
-- strict thread matches above, loose matches on Subject: below --
2017-03-07 19:52 Valery Tolstov
2017-03-07 20:11 ` Stefan Beller
2017-03-04 14:15 Valery Tolstov
2017-03-06 16:40 ` Stefan Beller
2017-03-04 12:15 Sven Strickroth
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1488913150.8812.0@smtp.yandex.ru \
--to=me@vtolstov.org \
--cc=CAGZ79kZbc394rmxYDUxCbysKNbEQCB7aLJkf6MGcCeXKAxiKhA@mail.gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=sbeller@google.com \
--cc=sven@cs-ware.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).