Re: Subtree with submodule inside?

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

 



On Wed, Aug 06, 2014 at 04:51:52PM -0700, Jonathan Nieder wrote:
> Junio C Hamano wrote:
> > Jonathan Nieder <jrnieder@xxxxxxxxx> writes:
> 
> >>  2. Submodules aware of their superproject and of the parent's branches.
> >>     In other words, submodules would act as though under refs/ they
> >>     had a symlink
> >>
> >> 	parent -> ../../../refs
> >>
> >>     So you could do
> >>
> >> 	git checkout --recurse-submodules master
> >>
> >> 	cd path/to/submodule
> >> 	git checkout parent/heads/next
> >>
> >>     This would avoid danger from "git gc" in submodules and would
> >>     get rid of most of the motivation for named branches in the
> >>     submodule, I'd think.
> >
> > Are you assuming that they share their object stores?
> 
> No.  The 'symlink' thing is a think-o.  (When trying to explain the
> idea I ended up oversimplifying and speaking nonsense.)
> 
> What I wanted to say is that parent/heads/next would be a way to
> refer from the submodule to the same commit as
> 
> 	refs/heads/next:path/to/submodule
> 
> refers to in the parent.

I like this idea. It could solve many issues and help in many cases I think.
Since we are currently quite busy with other things I took the liberty of
adding an ideas section in Jens submodule wiki[1]. This way we do not forget
about it and/or can refer others to it more easily.

I would appreciate if someone could have a look whether I described the idea
clearly enough.

Cheers Heiko

[1] https://github.com/jlehmann/git-submod-enhancements/wiki#dynamic-superproject-refs-in-submodules
--
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]