Re: Partial checkouts / submodules

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Daniel Barkalow
Date: Tuesday, November 20, 2007 - 11:03 am

On Tue, 20 Nov 2007, Finn Arne Gangstad wrote:


This has theoretical problems: it's going to be practically impossible, in 
most cases, to write a commit message that describes changes in three 
submodules (which are sometimes used in the context of a different 
supermodule) as well as the supermodule.

On the other hand, the supermodule commit is the one that's relevant in 
the context of the supermodule, and that commit's message should describe 
the set of changes as a whole.

I think it should be possible and sufficient to have "git commit" able to 
recursively start a "git commit" in submodules (where you'd write a 
separate message suitable for exposure to other supermodules), so you'd 
have to write 4 messages but only type one command line.


This should work. Of course, if other people have made changes to parts of 
the supermodule that you haven't checked out, your supermodule index will 
reflect those changes, so that supermodule commits you make aren't 
reverting or removing those submodules. But you won't fetch the contents 
of those submodules, and won't have them checked out. (Note, however, 
that, if you pull from two places, each of which has changed the same 
submodule you don't have in a different way, you'll get a conflict you 
can't resolve without getting the submodule yourself or getting somebody 
else to merge them; git won't let you make commits which leave the 
submodule merge for somebody who cares)


I don't think this aspect has been worked out too carefully. I think the 
branch is made only in the supermodule, but the submodules are attached to 
the supermodule's index, rather than particularly using branches, and so, 
when the supermodule switches branches, the submodules should all follow, 
regardless of whether they have explicit branches.


AFAIK, supermodules haven't gotten heavy enough use to work out all of the 
details of what should happen when the user does different things. I think 
it's all doable, but you may have to convince people to actually do it, 
and I don't think everything yet works the way you'd want.

	-Daniel
*This .sig left intentionally blank*
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Partial checkouts / submodules, Finn Arne Gangstad, (Tue Nov 20, 8:59 am)
Re: Partial checkouts / submodules, Sven Verdoolaege, (Tue Nov 20, 10:33 am)
Re: Partial checkouts / submodules, Daniel Barkalow, (Tue Nov 20, 11:03 am)
Re: Partial checkouts / submodules, Finn Arne Gangstad, (Tue Nov 20, 11:19 am)
Re: Partial checkouts / submodules, Steven Grimm, (Tue Nov 20, 11:26 am)
Re: Partial checkouts / submodules, Daniel Barkalow, (Tue Nov 20, 11:36 am)
Re: Partial checkouts / submodules, Sven Verdoolaege, (Tue Nov 20, 11:42 am)
Re: Partial checkouts / submodules, Sergei Organov, (Tue Nov 20, 11:55 am)
Re: Partial checkouts / submodules, Daniel Barkalow, (Tue Nov 20, 11:59 am)
Re: Partial checkouts / submodules, Daniel Barkalow, (Tue Nov 20, 12:15 pm)
Re: Partial checkouts / submodules, Finn Arne Gangstad, (Tue Nov 20, 12:22 pm)
Re: Partial checkouts / submodules, Daniel Barkalow, (Tue Nov 20, 1:18 pm)