Skip to content

Commit dfdcb55

Browse files
author
Junio C Hamano
committed
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 <junkio@cox.net>
1 parent f327dbc commit dfdcb55

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

git-fetch.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -252,10 +252,10 @@ fetch_main () {
252252
else
253253
not_for_merge=
254254
fi
255-
if expr "z$ref" : 'z\+' >/dev/null
255+
if expr "z$ref" : 'z+' >/dev/null
256256
then
257257
single_force=t
258-
ref=$(expr "z$ref" : 'z\+\(.*\)')
258+
ref=$(expr "z$ref" : 'z+\(.*\)')
259259
else
260260
single_force=
261261
fi

git-parse-remote.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ canon_refs_list_for_fetch () {
7777
force=
7878
case "$ref" in
7979
+*)
80-
ref=$(expr "z$ref" : 'z\+\(.*\)')
80+
ref=$(expr "z$ref" : 'z+\(.*\)')
8181
force=+
8282
;;
8383
esac

0 commit comments

Comments
 (0)