Re: SCSI trees, merges and git status
- From
Junio C Hamano <junkio@cox.net>
- Date
- Apr 18, 2005, 23:23 UTC
- Message-ID
- <7vmzrvsm8j.fsf@assigned-by-dhcp.cox.net>
- In-Reply-To
- <Pine.LNX.4.58.0504181429570.15725@ppc970.osdl.org>
>>>>> "LT" == Linus Torvalds <torvalds@osdl.org> writes:
LT> Merged. Here's the command line history:
LT> ~/git/git-pull-script \ LT> rsync://www.parisc-linux.org/~jejb/scsi-rc-fixes-2.6.git
Maybe it is just me, but I have this setup:
$ /bin/ls -lF .git
total 20
-rw-rw-r-- 1 junio src 41 Apr 18 16:03 HEAD
-rw-rw-r-- 1 junio junio 41 Apr 18 15:07 MERGE_HEAD
-rw------- 1 junio src 2720 Apr 18 16:03 index
lrwxrwxrwx 1 junio src 18 Apr 18 15:55 objects -> ../../.git/objects/My point being that .git/objects is a symbolic link and shares object database with somewhere else.
However the "Getting object database" part trashed this symlink when I tried to pull from my other repo locally. I am wondering it the following might be a better alternative. A possible downside in this approach is that you would not pull .git/heads and .git/tags (i.e. Pesky stuff) from the remote anymore. Is it a problem (I am also CC'ing Petr to hear his opinion on this).
If not, please apply.
[PATCH] Do not let rsync obliterate .git/object symbolic link.
Signed-off-by: Junio C Hamano <junkio@cox.net> --- git-pull-script: e27215d3978635558c63859495d97f8114b4ece3
--- a/git-pull-script +++ b/git-pull-script @@ -6,7 +6,7 @@ merge_repo=$1 echo "Getting object database" -rsync -avz --ignore-existing $merge_repo/ .git/ +rsync -avz --ignore-existing $merge_repo/objects/. .git/objects/. echo "Getting remote head" rsync -avz $merge_repo/HEAD .git/MERGE_HEAD