aboutsummaryrefslogtreecommitdiff
path: root/git-fetch.sh
diff options
context:
space:
mode:
Diffstat (limited to 'git-fetch.sh')
-rwxr-xr-xgit-fetch.sh6
1 files changed, 6 insertions, 0 deletions
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='<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"