Documentation/git-add: clarify -u with path limiting
[gitweb.git] / git-clone.sh
index 6ba477d1f4ee16c20e3fee7dd881f1645bcb80f1..70374aaaf0f766588739053becc36831381d4f35 100755 (executable)
@@ -18,7 +18,14 @@ usage() {
 }
 
 get_repo_base() {
-       (cd "$1" && (cd .git ; pwd)) 2> /dev/null
+       (
+               cd "`/bin/pwd`" &&
+               cd "$1" &&
+               {
+                       cd .git 2>/dev/null
+                       pwd
+               }
+       )
 }
 
 if [ -n "$GIT_SSL_NO_VERIFY" ]; then
@@ -60,7 +67,7 @@ Perhaps git-update-server-info needs to be run there?"
                else
                        tname=$name
                fi
-               git-http-fetch $v -a -w "$tname" "$name" "$1/" || exit 1
+               git-http-fetch $v -a -w "$tname" "$sha1" "$1" || exit 1
        done <"$clone_tmp/refs"
        rm -fr "$clone_tmp"
        http_fetch "$1/HEAD" "$GIT_DIR/REMOTE_HEAD" ||