* Referring to other repositories
@ 2010-12-14 1:03 Maaartin
2010-12-14 5:58 ` Konstantin Khomoutov
0 siblings, 1 reply; 2+ messages in thread
From: Maaartin @ 2010-12-14 1:03 UTC (permalink / raw)
To: git
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?
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Referring to other repositories
2010-12-14 1:03 Referring to other repositories Maaartin
@ 2010-12-14 5:58 ` Konstantin Khomoutov
0 siblings, 0 replies; 2+ messages in thread
From: Konstantin Khomoutov @ 2010-12-14 5:58 UTC (permalink / raw)
To: Maaartin; +Cc: git
On Tue, Dec 14, 2010 at 01:03:20AM +0000, Maaartin wrote:
> 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.
[...]
> 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).
[...]
> So it looks like using submodules is no option, but I hope you tell me that I'm
> wrong.
Windows supports directory-only symlinks on NTFS >= 3.0 (starting with
Windows 2000, that is), see [1], and it seems that since Vista there are
true symlinks (did not have a chance to use them yet).
I'm not sure if msysgit will play nicely with them, but at least you
could try.
[...]
1. http://en.wikipedia.org/wiki/NTFS_junction_point
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-12-14 5:58 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-12-14 1:03 Referring to other repositories Maaartin
2010-12-14 5:58 ` Konstantin Khomoutov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).