diff options
author | Junio C Hamano <junkio@cox.net> | 2006-12-14 00:36:23 -0800 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2006-12-14 02:45:51 -0800 |
commit | 4da9028578ffaaf8985e1436e2e1cf16bd3b9023 (patch) | |
tree | 332a967879eda2e493a26f012d9a2fa52777f60f /git-fetch.sh | |
parent | 02c9e93547d4c21635beb30895ebb6e37f67833c (diff) | |
download | git-4da9028578ffaaf8985e1436e2e1cf16bd3b9023.tar.gz |
git-fetch: make it work from within a subdirectory.
Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'git-fetch.sh')
-rwxr-xr-x | git-fetch.sh | 6 |
1 files changed, 6 insertions, 0 deletions
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='<fetch-options> <repository> <refspec>...' +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" |