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.lorimer.id.au/gitweb.git/diff_plain/4da9028578ffaaf8985e1436e2e1cf16bd3b9023?ds=inline;hp=--cc git-fetch: make it work from within a subdirectory. Signed-off-by: Junio C Hamano --- 4da9028578ffaaf8985e1436e2e1cf16bd3b9023 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"