Skip to content

Commit

Permalink
Fix-up previous expr changes.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Junio C Hamano committed Apr 14, 2006
1 parent f327dbc commit dfdcb55
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions git-fetch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion git-parse-remote.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit dfdcb55

Please sign in to comment.