From 9b75e9fa7b2c9bae2d386a380e7f80a7b6c4462e Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Mon, 1 Aug 2005 16:32:37 +0200 Subject: [PATCH] [PATCH] Do not rely on a sane wc Some implementations of wc pad the line number with white space, which expr does not grok as a number. Signed-off-by: Johannes Schindelin Signed-off-by: Junio C Hamano --- git-format-patch-script | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/git-format-patch-script b/git-format-patch-script index 994019e1..51e8af0a 100755 --- a/git-format-patch-script +++ b/git-format-patch-script @@ -109,7 +109,7 @@ _x40="$_x40$_x40$_x40$_x40$_x40$_x40$_x40$_x40" stripCommitHead='/^'"$_x40"' (from '"$_x40"')$/d' git-rev-list --merge-order "$junio" "^$linus" >$series -total=`wc -l <$series` +total=`wc -l <$series | tr -dc "[0-9]"` i=$total while read commit do -- 2.11.0