Referring to other repositories

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

 



I'm using multiple repositories corresponding to different projects. Currently, 
all the projects reside in different subdirectories of the same directory, like
work/A
work/B
work/C
There are some dependencies like B and C depending on A. Until now, my git 
knows nothing about it and it works fine, since most changes of A are 
unimportant for B and C (as A is my general purpose code which doesn't change 
much). There are three kinds of changes in A:
- unrelated changes completely irrelevant to the other projects (vast majority)
- changes made because of either B or C (sometimes)
- unrelated changes forcing updating B and/or C (very seldom)
Not keeping track about A in the other projects would be a problem if I was to 
use git bisect. Having to checkout the corresponding version of A when checking 
out an old version of B or C manually, is just an inconvenience, no real 
problem.

I know about git submodule, however IIUIC it needs the other project to become 
a subdirectory of the master, but I can hardly make A to subdirectory of both B 
and C (I'm a poor Windows user, so no symlinks). I could make copies of A as 
subdirectories, but having A thrice would be very impractical:
- I'd have to avoid modifying the copies instead of the master.
- All three versions would show up in my IDE.
- I'd have to keep them in sync.
So it looks like using submodules is no option, but I hope you tell me that I'm 
wrong.

What other possibilities are there? For the normal use, I'd be happy with git 
tracking the commit id of A somehow. I think I could do it by saving the output 
of
GIT_DIR=/e/work/A git log --max-count=1 --format=format:%H
in a file using a pre-commit hook. Or is there a better way?

For git bisect (which I haven't used yet but I'm going to), I'd need a way to 
check out the right version of A automatically, this could be done as part of 
the command given to git bisect run, right?


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