From: Junio C Hamano Date: Thu, 14 Dec 2006 08:36:23 +0000 (-0800) Subject: git-fetch: make it work from within a subdirectory. X-Git-Tag: v1.5.0-rc0~109 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=4da9028578ffaaf8985e1436e2e1cf16bd3b9023;p=git.git git-fetch: make it work from within a subdirectory. Signed-off-by: Junio C Hamano --- diff --git a/git-fetch.sh b/git-fetch.sh index 4eecf148e..fb35815a5 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"