From: Junio C Hamano Date: Fri, 14 Apr 2006 02:05:38 +0000 (-0700) Subject: Fix-up previous expr changes. X-Git-Tag: v1.3.0-rc4~9 X-Git-Url: https://git.octo.it/?p=git.git;a=commitdiff_plain;h=dfdcb558ecf93c0e09b8dab89cff4839e8c95e36 Fix-up previous expr changes. The regexp on the right hand side of expr : operator somehow was broken. expr 'z+pu:refs/tags/ko-pu' : 'z\+\(.*\)' does not strip '+'; write 'z+\(.*\)' instead. We probably should switch to shell based substring post 1.3.0; that's not bashism but just POSIX anyway. Signed-off-by: Junio C Hamano --- diff --git a/git-fetch.sh b/git-fetch.sh index 711650f3..83143f82 100755 --- a/git-fetch.sh +++ b/git-fetch.sh @@ -252,10 +252,10 @@ fetch_main () { else not_for_merge= fi - if expr "z$ref" : 'z\+' >/dev/null + if expr "z$ref" : 'z+' >/dev/null then single_force=t - ref=$(expr "z$ref" : 'z\+\(.*\)') + ref=$(expr "z$ref" : 'z+\(.*\)') else single_force= fi diff --git a/git-parse-remote.sh b/git-parse-remote.sh index 65c66d5d..c9b899e3 100755 --- a/git-parse-remote.sh +++ b/git-parse-remote.sh @@ -77,7 +77,7 @@ canon_refs_list_for_fetch () { force= case "$ref" in +*) - ref=$(expr "z$ref" : 'z\+\(.*\)') + ref=$(expr "z$ref" : 'z+\(.*\)') force=+ ;; esac