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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Jan 09, 2014 at 02:09:37AM +0100, Francesco Pretto wrote:
> 2014/1/9 W. Trevor King <wking@xxxxxxxxxx>:
> >   [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

Attachment: signature.asc
Description: OpenPGP digital signature


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]