From 2c346d256aa9804270a89c5aed0d4ba729537d1d Mon Sep 17 00:00:00 2001 From: Alexander Krasnukhin Date: Sat, 17 Nov 2012 13:17:19 +0100 Subject: [PATCH] Update bit/git-count Matching "):" in the end can match commit subjects by mistake i.e. if commit subject ends with "):" too (e.g. linux project has one such commit). To avoid this and any similar problems print summary only (-s). Restructure output to look exactly as it was before with awk. --- bin/git-count | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/git-count b/bin/git-count index d77f51d..a9bd148 100755 --- a/bin/git-count +++ b/bin/git-count @@ -1,7 +1,7 @@ #!/bin/sh if test "$1" = "--all"; then - git shortlog -n $@ | grep "):$" | sed 's|:||' + git shortlog -n -s $@ | awk '{print substr($0,index($0,$2)) " (" $1 ")"}' echo fi