Correctly document the name of the global excludes file configuration
[gitweb.git] / git-clone.sh
index cad5c0c088fa997c6f8f36c44e8888a5cb19515e..d45618d9afe203d103cb6cdcbd66e23b0dc42932 100755 (executable)
@@ -18,7 +18,14 @@ usage() {
 }
 
 get_repo_base() {
-       (cd "$1" && (cd .git ; pwd)) 2> /dev/null
+       (
+               cd "`/bin/pwd`" &&
+               cd "$1" || cd "$1.git" &&
+               {
+                       cd .git
+                       pwd
+               }
+       ) 2>/dev/null
 }
 
 if [ -n "$GIT_SSL_NO_VERIFY" ]; then