summaryrefslogtreecommitdiff
path: root/git-clone-script
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2005-08-17 22:18:41 (GMT)
committerJunio C Hamano <junkio@cox.net>2005-08-17 22:18:41 (GMT)
commit0f87f893657129907ff966f44aed7c7624d7ba1b (patch)
tree49e09ef1836f309b0f29995397dbe926879dbc5a /git-clone-script
parent6a0049c07623a387bf7f7e7c90b71344c23decfa (diff)
downloadgit-0f87f893657129907ff966f44aed7c7624d7ba1b.zip
git-0f87f893657129907ff966f44aed7c7624d7ba1b.tar.gz
git-0f87f893657129907ff966f44aed7c7624d7ba1b.tar.bz2
Make sure alternates are carried over from the original repository.
When we create a cheap local clone by pointing at the object databse of the original repository, we forgot to take the alternates the original repository might have had into account. Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'git-clone-script')
-rwxr-xr-xgit-clone-script6
1 files changed, 5 insertions, 1 deletions
diff --git a/git-clone-script b/git-clone-script
index 909ccc5..99c2459 100755
--- a/git-clone-script
+++ b/git-clone-script
@@ -81,7 +81,11 @@ yes,yes)
;;
yes)
mkdir -p "$D/.git/objects/info"
- echo "$repo/objects" >"$D/.git/objects/info/alternates"
+ {
+ test -f "$repo/objects/info/alternates" &&
+ cat "$repo/objects/info/alternates";
+ echo "$repo/objects"
+ } >"$D/.git/objects/info/alternates"
;;
esac