summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Schindelin <Johannes.Schindelin@gmx.de>2005-08-01 14:32:37 (GMT)
committerJunio C Hamano <junkio@cox.net>2005-08-01 20:27:09 (GMT)
commit9b75e9fa7b2c9bae2d386a380e7f80a7b6c4462e (patch)
tree00e1553b44abe4d0f535ec5e01d53059af4d834c
parentade75a59fd0738757019456e0a5a39d3d1af85d7 (diff)
downloadgit-9b75e9fa7b2c9bae2d386a380e7f80a7b6c4462e.zip
git-9b75e9fa7b2c9bae2d386a380e7f80a7b6c4462e.tar.gz
git-9b75e9fa7b2c9bae2d386a380e7f80a7b6c4462e.tar.bz2
[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 <Johannes.Schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
-rwxr-xr-xgit-format-patch-script2
1 files changed, 1 insertions, 1 deletions
diff --git a/git-format-patch-script b/git-format-patch-script
index 994019e..51e8af0 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