aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2005-08-17 15:18:41 -0700
committerJunio C Hamano <junkio@cox.net>2005-08-17 15:18:41 -0700
commit0f87f893657129907ff966f44aed7c7624d7ba1b (patch)
tree49e09ef1836f309b0f29995397dbe926879dbc5a
parent6a0049c07623a387bf7f7e7c90b71344c23decfa (diff)
downloadgit-0f87f893657129907ff966f44aed7c7624d7ba1b.tar.gz
git-0f87f893657129907ff966f44aed7c7624d7ba1b.tar.xz
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>
-rwxr-xr-xgit-clone-script6
1 files changed, 5 insertions, 1 deletions
diff --git a/git-clone-script b/git-clone-script
index 909ccc530..99c245963 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