From 0f87f893657129907ff966f44aed7c7624d7ba1b Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Wed, 17 Aug 2005 15:18:41 -0700 Subject: [PATCH] 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 --- git-clone-script | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/git-clone-script b/git-clone-script index 909ccc5301..99c2459631 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