Some implementations of wc pad the line number with white space, which
expr does not grok as a number.

Signed-off-by: Johannes Schindelin <[EMAIL PROTECTED]>

 git-format-patch-script |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/git-format-patch-script b/git-format-patch-script
--- a/git-format-patch-script
+++ b/git-format-patch-script
@@ -109,7 +109,7 @@ _x40="$_x40$_x40$_x40$_x40$_x40$_x40$_x4
 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]"`
 while read commit
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at

Reply via email to