Re: [RFC] Submodules in GIT

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Andy Parkins
Date: Thursday, November 30, 2006 - 7:49 am

On Thursday 2006 November 30 14:00, Stephan Feder wrote:


How are these commits any different from just having one big repository?  If 
some of the development of the submodule is contained in the supermodule then 
it's not a submodule anymore.

Why bother with all the effort to make a separation between submodule and 
supermodule and then store the submodule commits in the supermodule.  That's 
not supermodule/submodule git - that's just normal git.

Surely the whole point of having submodule's is so that you can take the 
submodule away.  Let me give you an example.  Let's say I have a project that 
uses the libxcb library (some random project out in the world that uses git).  
I've arranged it something like this:

myproject (git root)
 |----- src
 |----- doc
 `----- libxcb (git root)

This works fine; with one problem.  When I make a commit in myproject, there 
is no link into the particular snapshot of the libxcb that I used at that 
moment.  If libxcb moves on, and makes incompatible changes, then when I 
checkout an old version of myproject, it won't compile any more because I'll 
need to find out which commit of libxcb I used at the time.

Submodules will solve this problem.  In the future I'll be able to check out 
any commit of myproject and it will automatically checkout the right commit 
from the libxcb repository.  Now let's say I'm working away and find a bug in 
libxcb; I fix it, commit it.  That change had better be stored in the libxcb 
repository, and had better make no reference to the myproject repository.  If 
it doesn't, I'm going to have to pollute the libxcb upstream repository with 
myproject if I want to share those fixes.



Andy
-- 
Dr Andy Parkins, M Eng (hons), MIEE
andyparkins@gmail.com
-
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:
Re: [RFC] Submodules in GIT, Stephan Feder, (Thu Nov 30, 7:00 am)
Re: [RFC] Submodules in GIT, Andy Parkins, (Thu Nov 30, 7:49 am)
Re: [RFC] Submodules in GIT, Sven Verdoolaege, (Thu Nov 30, 8:20 am)
Re: [RFC] Submodules in GIT, Andy Parkins, (Thu Nov 30, 8:30 am)
Re: [RFC] Submodules in GIT, Andreas Ericsson, (Thu Nov 30, 8:50 am)
Re: [RFC] Submodules in GIT, sf, (Thu Nov 30, 9:05 am)
Re: [RFC] Submodules in GIT, Andy Parkins, (Thu Nov 30, 9:08 am)
Re: [RFC] Submodules in GIT, sf, (Thu Nov 30, 9:12 am)
Re: [RFC] Submodules in GIT, Sven Verdoolaege, (Thu Nov 30, 9:33 am)
Re: [RFC] Submodules in GIT, Martin Waitz, (Thu Nov 30, 10:19 am)
Re: [RFC] Submodules in GIT, Andy Parkins, (Thu Nov 30, 5:01 pm)
Re: [RFC] Submodules in GIT, Andy Parkins, (Fri Dec 1, 2:19 am)
Re: [RFC] Submodules in GIT, Sven Verdoolaege, (Fri Dec 1, 2:32 am)
Re: [RFC] Submodules in GIT, Martin Waitz, (Fri Dec 1, 2:57 am)
Re: [RFC] Submodules in GIT, Andy Parkins, (Fri Dec 1, 3:19 am)
Re: [RFC] Submodules in GIT, Andy Parkins, (Fri Dec 1, 3:29 am)
Re: [RFC] Submodules in GIT, Sven Verdoolaege, (Fri Dec 1, 3:42 am)
Re: [RFC] Submodules in GIT, Andy Parkins, (Fri Dec 1, 4:02 am)
Re: [RFC] Submodules in GIT, Sven Verdoolaege, (Fri Dec 1, 4:10 am)
Re: [RFC] Submodules in GIT, Martin Waitz, (Fri Dec 1, 4:31 am)
Re: [RFC] Submodules in GIT, sf, (Fri Dec 1, 4:45 am)
Re: [RFC] Submodules in GIT, Martin Waitz, (Fri Dec 1, 4:46 am)
Re: [RFC] Submodules in GIT, Andy Parkins, (Fri Dec 1, 5:12 am)
Re: [RFC] Submodules in GIT, Andy Parkins, (Fri Dec 1, 5:16 am)
Re: [RFC] Submodules in GIT, Andy Parkins, (Fri Dec 1, 5:20 am)
Re: [RFC] Submodules in GIT, Martin Waitz, (Fri Dec 1, 5:28 am)
Re: [RFC] Submodules in GIT, Martin Waitz, (Fri Dec 1, 5:34 am)
Re: [RFC] Submodules in GIT, Martin Waitz, (Fri Dec 1, 5:37 am)
Re: [RFC] Submodules in GIT, Andy Parkins, (Fri Dec 1, 6:59 am)
Re: [RFC] Submodules in GIT, Martin Waitz, (Fri Dec 1, 7:07 am)
Re: [RFC] Submodules in GIT, Andy Parkins, (Fri Dec 1, 7:11 am)
Re: [RFC] Submodules in GIT, Martin Waitz, (Fri Dec 1, 8:12 am)