From 4da9028578ffaaf8985e1436e2e1cf16bd3b9023 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Thu, 14 Dec 2006 00:36:23 -0800 Subject: [PATCH] git-fetch: make it work from within a subdirectory. Signed-off-by: Junio C Hamano --- git-fetch.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/git-fetch.sh b/git-fetch.sh index 4eecf148ea..fb35815a5f 100755 --- a/git-fetch.sh +++ b/git-fetch.sh @@ -2,7 +2,13 @@ # USAGE=' ...' +SUBDIRECTORY_OK=Yes . git-sh-setup +TOP=$(git-rev-parse --show-cdup) +if test ! -z "$TOP" +then + cd "$TOP" +fi . git-parse-remote _x40='[0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f]' _x40="$_x40$_x40$_x40$_x40$_x40$_x40$_x40$_x40"