X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=git-clone.sh;h=b78524767c0a3fd8ce99412e1d0b92a9a9ba26fb;hb=d9635e9c539465792b1920437b52fa8792a71650;hp=c013e481d044b3b11155d970f785766bc4c18613;hpb=1bdbb57407ca28abce3fb731d01bfcbe74a9734a;p=git.git diff --git a/git-clone.sh b/git-clone.sh index c013e481..b7852476 100755 --- a/git-clone.sh +++ b/git-clone.sh @@ -38,12 +38,12 @@ Perhaps git-update-server-info needs to be run there?" } while read sha1 refname do - name=`expr "$refname" : 'refs/\(.*\)'` && + name=`expr "z$refname" : 'zrefs/\(.*\)'` && case "$name" in *^*) continue;; esac if test -n "$use_separate_remote" && - branch_name=`expr "$name" : 'heads/\(.*\)'` + branch_name=`expr "z$name" : 'zheads/\(.*\)'` then tname="remotes/$origin/$branch_name" else @@ -265,7 +265,7 @@ yes,yes) test -f "$repo/objects/info/alternates" && cat "$repo/objects/info/alternates"; echo "$repo/objects" - } >"$GIT_DIR/objects/info/alternates" + } >>"$GIT_DIR/objects/info/alternates" ;; esac git-ls-remote "$repo" >"$GIT_DIR/CLONE_HEAD" @@ -346,7 +346,7 @@ then # new style repository with a symref HEAD). # Ideally we should skip the guesswork but for now # opt for minimum change. - head_sha1=`expr "$head_sha1" : 'ref: refs/heads/\(.*\)'` + head_sha1=`expr "z$head_sha1" : 'zref: refs/heads/\(.*\)'` head_sha1=`cat "$GIT_DIR/$remote_top/$head_sha1"` ;; esac