From d30db5605b03a45b2848fa9131c3485dc93f7dad Mon Sep 17 00:00:00 2001 From: Jay Soffian Date: Thu, 6 Oct 2011 14:25:55 -0400 Subject: merge-one-file: fix "expr: non-numeric argument" When invoking expr to compare two numbers, don't quote the variables which are the output of 'wc -c'. On OS X, this output includes spaces, which expr balks at: $ sz0=`wc -c Signed-off-by: Junio C Hamano --- git-merge-one-file.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'git-merge-one-file.sh') diff --git a/git-merge-one-file.sh b/git-merge-one-file.sh index d067894bf..ae97e1dfa 100755 --- a/git-merge-one-file.sh +++ b/git-merge-one-file.sh @@ -112,7 +112,7 @@ case "${1:-.}${2:-.}${3:-.}" in # If we do not have enough common material, it is not # worth trying two-file merge using common subsections. - expr "$sz0" \< "$sz1" \* 2 >/dev/null || : >$orig + expr $sz0 \< $sz1 \* 2 >/dev/null || : >$orig ;; *) echo "Auto-merging $4" -- cgit v1.2.1