Re: [RFC/PATCH] add update to branch support for "floating submodules"

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

 



Am 13.12.2011 16:35, schrieb Marc Branchaud:
> I'd prefer to have floating be explicitly configured on a per-branch (or
> per-branch-glob) basis.  So in addition to what Jens described yesterday [1]
> to configure an individual submodule's floating branch, I suggest there also
> be a new section in the .gitmodules file for configuring the super-repo's
> floating branches, e.g.
> 
> 	[super]
> 		floaters = refs/heads/master refs/heads/dev*
> 
> 	[submodule "Sub1"]
> 		path = foo/bar
> 		branch = maint
> 		url = ...
> 
> 	[submodule "Sub2"]
> 		path = other/place
> 		url = ...

Hmm, but you can have different .gitmodules files in different branches of
the superproject, no? Why not just have the "branch = maint" setting for
"Sub1" in the master and the dev branches .gitmodules file and drop it in
the other branches?

> This would mean that whenever the super-repo checks out either the "master"
> branch or a branch whose name starts with "dev" (assuming recursive checkouts
> are on):
> 
>   * The Sub1 submodule automatically checks out the tip of its
>     "maint" branch.
> 
>   * The Sub2 submodule (lacking a "branch" variable) would not float
>     and would check out the commit recorded in the super-repo.
> 
> A super-repo recursive-checkout that doesn't match a floaters pattern would
> work in the regular, non-floating way.

Which would just work with my proposal too if git would honor the
.gitmodules file of the currently checked out branch.

> [1] http://article.gmane.org/gmane.comp.version-control.git/186969

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[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]