Re: RFC: Making submodules "track" branches

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

 



Am 08.06.2010 23:52, schrieb Johan Herland:
> The good thing with Ævar's approach is that this is all configurable per 
> branch (indeed, per commit[1]) by editing your .gitmodules file.

Yep, I think this is the sane way to do that.


> Interesting. Will the object parsing machinery handle that without hiccups? 
> What if an older Git version tries to checkout/update a submodule with a 0-
> hash?

Maybe Ævar's idea of dropping such a submodule from the tree is better.


> Me too, but I suspect that if you draw the "one big repo" approach to its 
> logical conclusion, there will be some demand for recursive commits.

You may be right here. But as submodules often have a detached HEAD, this
might get interesting ;-)


> [1]: Say your submodule usually tracks a branch, but you're creating some 
> tag in the super-repo, and you want that tag to uniquely identify the 
> submodule. You achieve this by making sure the tagged commit removes the 
> relevant "branch = whatever" line from .gitmodules, and records the 
> appropriate submodule version in the super-repo tree. Then, you can revert 
> the .gitmodules change on the next commit to resume tracking the submodule 
> branch.
> 
> Now, whenever you checkout the tag, you will always get the exact same 
> version of the submodule, although the submodule otherwise tracks some 
> branch.

Won't work anymore when we would use 0{40} or drop it from the tree.
AFAICS always-tip and referencing a certain commit don't mix well.
--
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]