summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xgit-fetch.sh6
1 files changed, 6 insertions, 0 deletions
diff --git a/git-fetch.sh b/git-fetch.sh
index 4eecf14..fb35815 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"