From: <rsbecker@nexbridge.com>
To: "'Glen Choo'" <chooglen@google.com>, <git@vger.kernel.org>
Subject: RE: [RFC] Branches with --recurse-submodules
Date: Wed, 10 Nov 2021 15:25:27 -0500 [thread overview]
Message-ID: <000a01d7d671$1c7d4820$5577d860$@nexbridge.com> (raw)
In-Reply-To: <kl6lee7nvm6t.fsf@chooglen-macbookpro.roam.corp.google.com>
On November 10, 2021 2:35 PM, Glen Choo wrote:
>
> Overall, I think your workflow is not too dissimilar to the UX we are proposing
> :)
>
> <rsbecker@nexbridge.com> writes:
>
> > 4. If working on the submodule, use a branch, not a commit - typically off
> main.
>
> With the proposed UX, step (4) would happen automatically when using
> "branch --recurse-submodules". Users would get a safer and more
> convenient default.
I think this might be more reliably done using a switch in .gitconfig to enable the capabilities. Perhaps something like:
submodule.fetch-branches=true
> > What I could see as a possible improvement is to add the branch ref to the
> submodule ref file - not replacing the commit but adding to it. I do worry that
> there are unintended (unforeseen) side-effects that will result from this,
> however, including potential merge conflicts. Two people working on the
> same commit but different branches may mess the ref file, so not really a
> good idea.
>
> It's an interesting idea, but as you noted, it is quite thorny. I would also like to
> see more information being captured by the superproject tree (instead of
> just .gitmodules), but I'm also not sure how we might do that.
I'm suggesting this instead of a command-line option because this seems more like a policy-based process that you would either always want or never want. I would not like to depend on a developer making the call each time a clone occurred. I'm sad to admit that I don't really know where to start on this enhancement, though, even if approved.
-Randall
next prev parent reply other threads:[~2021-11-10 20:26 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-08 22:33 [RFC] Branches with --recurse-submodules Glen Choo
2021-11-10 18:21 ` Glen Choo
2021-11-10 18:35 ` rsbecker
2021-11-10 19:35 ` Glen Choo
2021-11-10 20:25 ` rsbecker [this message]
2021-11-11 18:12 ` Glen Choo
2021-11-12 3:22 ` Philippe Blain
2021-11-12 3:19 ` Philippe Blain
2021-11-15 19:03 ` Glen Choo
2021-11-23 18:36 ` Philippe Blain
2021-11-23 19:04 ` Glen Choo
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='000a01d7d671$1c7d4820$5577d860$@nexbridge.com' \
--to=rsbecker@nexbridge.com \
--cc=chooglen@google.com \
--cc=git@vger.kernel.org \
/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).