Re: RFC: Making submodules "track" branches

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Marc Branchaud
Date: Wednesday, June 9, 2010 - 8:36 am

On 10-06-09 03:15 AM, Jens Lehmann wrote:

I too am in this camp.

If a submodule is tracking the tip of a branch, I think it's vital that
checking out the superproject's HEAD@{3 months ago} gives you the submodule
as it was in the superproject 3 months ago.  Back then, it may have been
tracking a different branch.  It may not have been tracking a branch at all.
 It may have been using a completely different repository altogether.

It's hard for me to see the utility of having the submodule reflect the
tip-of-some-branch-as-of-today when I'm looking at 3-month-old code in the
superproject.

AFAICT, Ævar's original proposal does the right thing here, because a
submodule tracking a branch would look dirty in the superproject if the
branch's HEAD doesn't match the commit ID recorded in the superproject.  So
"submodule update" would restore the submodule's state to what the
superproject says it should be.

I don't think I mind dirty branch-tracking submodules, but folks seem to find
it distasteful.  However, I believe all the proposals made so far to address
it break what I call the superproject's "historical consistency."

I wish I could come up with some way to reconcile clean branch-tracking
submodules with historical consistency, but alas my imagination is so far too
limited.  :(

		M.
--
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:
RFC: Making submodules "track" branches, Ævar Arnfjörð Bjarmason, (Mon Jun 7, 4:29 pm)
Re: RFC: Making submodules "track" branches, Johan Herland, (Tue Jun 8, 12:12 am)
Re: RFC: Making submodules "track" branches, Marc Branchaud, (Tue Jun 8, 8:34 am)
Re: RFC: Making submodules "track" branches, Jens Lehmann, (Tue Jun 8, 9:06 am)
Re: RFC: Making submodules "track" branches, Ævar Arnfjörð Bjarmason, (Tue Jun 8, 9:09 am)
Re: RFC: Making submodules "track" branches, Marc Branchaud, (Tue Jun 8, 12:32 pm)
Re: RFC: Making submodules "track" branches, Ævar Arnfjörð Bjarmason, (Tue Jun 8, 1:23 pm)
Re: RFC: Making submodules "track" branches, Johan Herland, (Tue Jun 8, 2:52 pm)
Re: RFC: Making submodules "track" branches, Junio C Hamano, (Tue Jun 8, 4:09 pm)
Re: RFC: Making submodules "track" branches, Ævar Arnfjörð Bjarmason, (Tue Jun 8, 4:19 pm)
Re: RFC: Making submodules "track" branches, Jens Lehmann, (Wed Jun 9, 12:09 am)
Re: RFC: Making submodules "track" branches, Jens Lehmann, (Wed Jun 9, 12:15 am)
Re: RFC: Making submodules "track" branches, Jens Lehmann, (Wed Jun 9, 12:23 am)
Re: RFC: Making submodules "track" branches, Johan Herland, (Wed Jun 9, 1:22 am)
Re: RFC: Making submodules "track" branches, Steven Michalske, (Wed Jun 9, 5:47 am)
Re: RFC: Making submodules "track" branches, Marc Branchaud, (Wed Jun 9, 7:36 am)
Re: RFC: Making submodules "track" branches, Johan Herland, (Wed Jun 9, 7:37 am)
Re: RFC: Making submodules "track" branches, Marc Branchaud, (Wed Jun 9, 8:36 am)
Re: RFC: Making submodules "track" branches, Ævar Arnfjörð Bjarmason, (Wed Jun 9, 11:54 am)