Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Wooding <mdw@distorted.org.uk>2006-04-14 02:01:24 +0400
committerJunio C Hamano <junkio@cox.net>2006-04-14 03:45:48 +0400
commitf327dbced25a3c6fcc0b84d2d6adffa9343b09f0 (patch)
tree9725761748a6282d0be75879546ddf72d98b2501 /git-clone.sh
parent2283645b85dc91ca958b05066511083255a8612a (diff)
Shell utilities: Guard against expr' magic tokens.
Some words, e.g., `match', are special to expr(1), and cause strange parsing effects. Track down all uses of expr and mangle the arguments so that this isn't a problem. Signed-off-by: Mark Wooding <mdw@distorted.org.uk> Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'git-clone.sh')
-rwxr-xr-xgit-clone.sh6
1 files changed, 3 insertions, 3 deletions
diff --git a/git-clone.sh b/git-clone.sh
index c013e481d0..0805168057 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