Re: [RFC] Submodules in GIT

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

 



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

> Again I do not see the problem. Probably I have a much simpler picture
> of submodules: They are just commits in the supermodule's tree.
> Everything else follows naturally from how git currently behaves.

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@xxxxxxxxx
-
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]