Re: Re: [RFC v2] submodule: Respect requested branch on all clones
- From
Francesco Pretto <ceztko@gmail.com>
- Date
- Jan 8, 2014, 23:07 UTC
- Message-ID
- <CALas-iheQ4Rfxvty5guEieVwa8SffRnhRdHkNXUKwmuHRXD2Xg@mail.gmail.com>
- In-Reply-To
- <20140108010504.GE26583@odin.tremily.us>
2014/1/8 W. Trevor King <wking@tremily.us>:
Show 14 quoted lines
> To elaborate the idea I sketched out here [2], say > you want: > > Superproject branch Submodule branch Upstream branch > =================== ================ =============== > master master master > super-feature master master > my-feature my-feature master > other-feature other-feature other-feature > > That's only going to work with per-superproject-branch configs for > both the local and remote branches. Using the same name for both > local and remote branches does not work. >
After long thoughts, I think your idea about a local branch with a differently named remote branch looks interesting but I would be extremely cautious to add a ' submodule.<name>.local-branch' now. Do we have a similar mechanism on regular repository clones? We can clone and switch to a branch other than "master" by default, but can we also have a different remote by default? If we don't have it, we shouldn't add it first on submodules, as there's the chance the feature never get coupled on the regular clones.
Also, I think you fear too much that this can't be added also later.
I think you should pursue your initial proposal of "--branch means attached" to get it upstream first. It's alone, IMO, a great improvement on submodules.