X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=git-clone.sh;h=0805168057c871549d87ff4e9e30d654abbed0a4;hb=749864627c2d3c33bbc56d7ba0b5542af698cc40;hp=c013e481d044b3b11155d970f785766bc4c18613;hpb=46e48c36043447b9739cdd7cae768dc53b5bc89d;p=git.git diff --git a/git-clone.sh b/git-clone.sh index c013e481..08051680 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 @@ -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