Subject: RE: RFC/Discussion - Submodule UX Improvements

From: "Randall S. Becker" <[email-masked]>
Date: Mon, 19 Apr 2021 08:56:32 -0400

> -----Original Message-----
> From: Emily Shaffer <[email-masked]>
On April 16, 2021 7:37 PM, Emily Shaffer wrote:
> As hinted by a couple recent patches, I'm planning on some pretty big
> submodule work over the next 6 months or so - and Ævar pointed out to me
in
> https://lore.kernel.org/git/[email-masked] that I
> probably should share some of those plans ahead of time. :) So attached is
a
> lightly modified version of the doc that we've been working on internally
at
> Google, focusing on what we think would be an ideal submodule workflow.
> 
> I'm hoping that folks will get a chance to read some or all of it and let
us know
> what sounds cool (or sounds extremely broken). The best spot to start is
> probably the "Overview" section, which describes what the "main path"
would
> look like for a user working on a project with submodules. Most of the
work
> that we're planning on doing is under the "What doesn't already work"
> headings.
> 
> Thanks in advance for any time you spend reading/discussing :)
<big snip>

Just adding my voice here, this is something my teams would be very happy to
consider.

> - Worktrees
> When a user runs 'git worktree add' from the superproject, each submodule
>  in the new worktree should also be created as a worktree of the
corresponding
>  submodule in the original project.
> What doesn't already work:
>   * worktrees and submodules getting along - submodules are now freshly
cloned
>     when creating a superproject worktree

My teams are currently debating the use of submodules (we have gone back and
forth over the years on these) and worktrees (which seem to have some
positive process implications for those more legacy-ish team members more
used to a centralised workflows). I have not seen any worktree/submodule
combinations used but fear the worst - as in I'm pretty sure I know which of
my team members is going to try this. It is probably a separate matter to
make the two get along better.

Cheers,
Randall

-- Brief whoami:
NonStop developer since approximately 211288444200000000
UNIX developer since approximately 421664400
-- In my real life, I talk too much.