From: Johannes Schindelin Date: Mon, 1 Aug 2005 14:32:37 +0000 (+0200) Subject: [PATCH] Do not rely on a sane wc X-Git-Tag: v0.99.3~3 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=9b75e9fa7b2c9bae2d386a380e7f80a7b6c4462e;p=git.git [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 --- diff --git a/git-format-patch-script b/git-format-patch-script index 994019e17..51e8af0ac 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