{"thread":{"id":"1392","subject":"[PATCH] Do not rely on a sane wc","startedAt":"2005-08-01T14:32:37Z","lastAt":"2005-08-01T14:32:37Z","messageCount":1,"participants":["Johannes Schindelin"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"6712","messageId":"Pine.LNX.4.58.20050801163156.12985@wgmdd8.biozentrum.uni-wuerzburg.de","threadId":"1392","inReplyTo":null,"subject":"[PATCH] Do not rely on a sane wc","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2005-08-01T14:32:37Z","receivedAt":"2005-08-01T14:32:37Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Some implementations of wc pad the line number with white space, which\nexpr does not grok as a number.\n\nSigned-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>\n---\n\n git-format-patch-script |    3 ++-\n 1 files changed, 2 insertions(+), 1 deletions(-)\n\nda0488e94f7f949cbfce7422980eb2fe38166b9a\ndiff --git a/git-format-patch-script b/git-format-patch-script\n--- a/git-format-patch-script\n+++ b/git-format-patch-script\n@@ -109,7 +109,7 @@ _x40=\"$_x40$_x40$_x40$_x40$_x40$_x40$_x4\n stripCommitHead='/^'\"$_x40\"' (from '\"$_x40\"')$/d'\n\n git-rev-list --merge-order \"$junio\" \"^$linus\" >$series\n-total=`wc -l <$series`\n+total=`wc -l <$series | tr -dc \"[0-9]\"`\n i=$total\n while read commit\n do\n"}]}