Fix check_file_directory_conflict().
[gitweb.git] / git-fetch.sh
index 4eecf148ea90c02bfe9f2aa018118ccbd26f8e97..fb35815a5fbf1074f6a4a2fb08c6c9656c6a1654 100755 (executable)
@@ -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"