{"thread":{"id":"26044","subject":"Referring to other repositories","startedAt":"2010-12-14T01:03:20Z","lastAt":"2010-12-14T05:58:25Z","messageCount":2,"participants":["Maaartin","Konstantin Khomoutov"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"158012","messageId":"loom.20101214T011043-268@post.gmane.org","threadId":"26044","inReplyTo":null,"subject":"Referring to other repositories","fromName":"Maaartin","fromEmail":"grajcar1@seznam.cz","sentAt":"2010-12-14T01:03:20Z","receivedAt":"2010-12-14T01:03:20Z","isPatch":false,"sender":{"key":"grajcar1@seznam.cz","avatar":null},"body":"I'm using multiple repositories corresponding to different projects. Currently, \nall the projects reside in different subdirectories of the same directory, like\nwork/A\nwork/B\nwork/C\nThere are some dependencies like B and C depending on A. Until now, my git \nknows nothing about it and it works fine, since most changes of A are \nunimportant for B and C (as A is my general purpose code which doesn't change \nmuch). There are three kinds of changes in A:\n- unrelated changes completely irrelevant to the other projects (vast majority)\n- changes made because of either B or C (sometimes)\n- unrelated changes forcing updating B and/or C (very seldom)\nNot keeping track about A in the other projects would be a problem if I was to \nuse git bisect. Having to checkout the corresponding version of A when checking \nout an old version of B or C manually, is just an inconvenience, no real \nproblem.\n\nI know about git submodule, however IIUIC it needs the other project to become \na subdirectory of the master, but I can hardly make A to subdirectory of both B \nand C (I'm a poor Windows user, so no symlinks). I could make copies of A as \nsubdirectories, but having A thrice would be very impractical:\n- I'd have to avoid modifying the copies instead of the master.\n- All three versions would show up in my IDE.\n- I'd have to keep them in sync.\nSo it looks like using submodules is no option, but I hope you tell me that I'm \nwrong.\n\nWhat other possibilities are there? For the normal use, I'd be happy with git \ntracking the commit id of A somehow. I think I could do it by saving the output \nof\nGIT_DIR=/e/work/A git log --max-count=1 --format=format:%H\nin a file using a pre-commit hook. Or is there a better way?\n\nFor git bisect (which I haven't used yet but I'm going to), I'd need a way to \ncheck out the right version of A automatically, this could be done as part of \nthe command given to git bisect run, right?\n"},{"id":"158033","messageId":"20101214055825.GJ3264@localhost.localdomain","threadId":"26044","inReplyTo":"loom.20101214T011043-268@post.gmane.org","subject":"Re: Referring to other repositories","fromName":"Konstantin Khomoutov","fromEmail":"flatworm@users.sourceforge.net","sentAt":"2010-12-14T05:58:25Z","receivedAt":"2010-12-14T05:58:25Z","isPatch":false,"sender":{"key":"flatworm@users.sourceforge.net","avatar":null},"body":"On Tue, Dec 14, 2010 at 01:03:20AM +0000, Maaartin wrote:\n\n> I'm using multiple repositories corresponding to different projects. Currently, \n> all the projects reside in different subdirectories of the same directory, like\n> work/A\n> work/B\n> work/C\n> There are some dependencies like B and C depending on A.\n[...]\n> I know about git submodule, however IIUIC it needs the other project to become \n> a subdirectory of the master, but I can hardly make A to subdirectory of both B \n> and C (I'm a poor Windows user, so no symlinks).\n[...]\n> So it looks like using submodules is no option, but I hope you tell me that I'm \n> wrong.\nWindows supports directory-only symlinks on NTFS >= 3.0 (starting with\nWindows 2000, that is), see [1], and it seems that since Vista there are\ntrue symlinks (did not have a chance to use them yet).\nI'm not sure if msysgit will play nicely with them, but at least you\ncould try.\n\n[...]\n\n1. http://en.wikipedia.org/wiki/NTFS_junction_point\n"}]}