Thread (36 messages) flat view 36 messages, 8 authors, 2016-06-15

Re: Notes on Using Git with Subprojects

From: Johannes Schindelin <hidden>
Date: 2016-06-15 22:42:42

Hi,

On Wed, 27 Sep 2006, A Large Angry SCM wrote:
Johannes Schindelin wrote:
quoted
Hi,

On Wed, 27 Sep 2006, Martin Waitz wrote:
quoted
On Tue, Sep 26, 2006 at 03:33:49PM -0700, A Large Angry SCM wrote:
quoted
So, for each subproject of a parent project, you want to record branch,
version (commit ID), and directory location. Not quite as easy to do in
a makefile but do-able.
I've been playing with this kind of subprojects a little bit.

My current approach is like this:

 * create a .gitmodules file which lists all the directories
   which contain a submodule.
 * the .git/refs/heads directory of the submodule gets stored in
   .gitmodule/<modulename> inside the parent project
Taking this a step further, you could make subproject/.git/refs/heads a
symbolic link to .git/refs/heads/subproject, with the benefit that fsck Just
Works.
Wouldn't an fsck in the parent complain about missing objects?
... not if my original idea (which I might have forgotten to mention ;-) 
was implemented: symlinking subproject/.git/objects to .git/objects.

Ciao,
Dscho
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help