git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: RFC/Discussion - Submodule UX Improvements

From
Aaron Schrab <aaron@schrab.com>
Date
Apr 19, 2021, 12:56 UTC
Message-ID
<YH1+C47AErrCUkHI@pug.qqx.org>
In-Reply-To
<YHofmWcIAidkvJiD@google.com>
At 16:36 -0700 16 Apr 2021, Emily Shaffer <emilyshaffer@google.com> wrote:
>- git switch / git checkout
(snip)
Show 12 quoted lines
>4. A new branch with the same name is created on each submodule.
>  a. If there is a naming conflict, we could prompt the user to resolve it, or
>     we could just check out the branch by that name and print a warning to the
>     user with advice on how to solve it (cd submodule && git switch -c
>     different-branch-name HEAD@{1}). Maybe we could skip the warning/advice if
>     the tree is identical to the tree we would have used as the start point
>     (that is, the user switched branches in the submodule, then said "oh crap"
>     and went back and switched branches in the superproject).
>  b. Tracking info is set appropriately on each new branch to the upstream of
>     the branch referenced by the parent of the new superproject commit, OR to
>     the default branch's upstream.
>5. The new branch is checked out on each of the submodules.

In many cases the branch name for the superproject isn't going to be appropriate for submodules.

This seems likely to create a LOT of junk branches. Do you also have a proposal for cleaning those up?

Previous: Randall S. BeckerNext: Emily Shaffer
Message 9 of 18 in “RFC/Discussion - Submodule UX Improvements”
  1. Emily ShafferApr 16, 2021
  2. Christian CouderApr 18, 2021
  3. Emily ShafferApr 20, 2021
  4. Philippe BlainApr 19, 2021
  5. Emily ShafferApr 20, 2021
  6. Junio C HamanoApr 20, 2021
  7. Philippe BlainApr 21, 2021
  8. Randall S. BeckerApr 19, 2021
  9. Aaron SchrabApr 19, 2021
  10. Emily ShafferApr 20, 2021
  11. Randall S. BeckerApr 20, 2021
  12. Jacob KellerApr 19, 2021
  13. Randall S. BeckerApr 19, 2021
  14. Jacob KellerApr 20, 2021
  15. Emily ShafferApr 20, 2021
  16. Randall S. BeckerApr 20, 2021
  17. Jacob KellerApr 21, 2021
  18. Jacob KellerApr 22, 2021

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.