Thread (38 messages) flat view 38 messages, 5 authors, 2016-06-15

Re: [RFC v2] submodule: Respect requested branch on all clones

From: W. Trevor King <hidden>
Date: 2016-06-15 22:59:38

Possibly related (same subject, not in this thread)

On Thu, Jan 09, 2014 at 02:09:37AM +0100, Francesco Pretto wrote:
2014/1/9 W. Trevor King [off-list ref]:
quoted
  [branch "my-feature"]
        remote = origin
        merge = refs/heads/my-feature
        [submodule "submod"]
            local-branch = "my-feature"

and I don't think Git's config supports such nesting.
Aesthetically, It doesn't look very nice.
The INI syntax does not lend itself to easy nesting, but I'm pretty
sure some mapping from (<superproject-branch>, <submodule-name>) to
<submodule-local-branch-name> is what we need for submodule checkouts.
I'm just not sure where local overides to the per-branch .gitmodules
should live.  We could turn it around, and store:

  [superproject "<superproject-branch>"]
      local-branch = "<submodule-local-branch-name>"

in .git/modules/<submodule-name>/config, with the UI:

  $ cd submodule
  $ git config superproject.<superproject-branch>.local-branch = <submodule-branch>

Not beautiful, but maybe a bit more palatable, and already supported
by Git's current config parser.  That's enough that I can work up a
patch that will hopefully clarify my position ;).

Cheers,
Trevor

-- 
This email may be signed or encrypted with GnuPG (http://www.gnupg.org).
For more information, see http://en.wikipedia.org/wiki/Pretty_Good_Privacy

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help