From: Namhyung Kim <namhyung@kernel.org>
To: Minchan Kim <minchan@kernel.org>
Cc: LKML <linux-kernel@vger.kernel.org>, Namhyung Kim <namhyung.kim@lge.com>
Subject: [PATCH] Linux kernel contribution count script
Date: Thu, 6 Sep 2012 15:17:34 +0900 [thread overview]
Message-ID: <1346912254-21526-1-git-send-email-namhyung@kernel.org> (raw)
From: Namhyung Kim <namhyung.kim@lge.com>
$ ./contrib-count.sh
Usage: ./contrib-count.sh <Name> [ <Year> ]
$ ./contrib-count.sh Namhyung
Signed-off: 125
Reviewed: 3
Acked: 1
Tested: 0
$ ./contrib-count.sh Minchan 2012
Signed-off: 20
Reviewed: 32
Acked: 10
Tested: 1
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
---
contrib-count.sh | 27 +++++++++++++++++++++++++++
1 file changed, 27 insertions(+)
create mode 100755 contrib-count.sh
diff --git a/contrib-count.sh b/contrib-count.sh
new file mode 100755
index 000000000000..4d246db5735d
--- /dev/null
+++ b/contrib-count.sh
@@ -0,0 +1,27 @@
+#!/bin/sh
+#
+# Linux kernel contiribution counter.
+# It actually can be used on any git-managed projects.
+#
+
+if [ $# -eq 0 ]; then
+ echo "Usage: $0 <Name> [ <Year> ]"
+ exit 1
+fi
+
+NAME=$1
+
+# defaults to current year in YYYY format
+YEAR=$(date +"%Y")
+
+if [ $# -ge 2 ]; then
+ YEAR=$2
+fi
+
+for TAG in "Signed-off" "Reviewed" "Acked" "Tested";
+do
+ echo -n "$TAG: "
+ git log --grep="$TAG-by: $NAME" --since "$YEAR-01-01" --until "$YEAR-12-31" origin/master | \
+ git shortlog -sn | \
+ awk 'BEGIN { count = 0; } { count += $1; } END { print count; }'
+done
--
1.7.11.4
next reply other threads:[~2012-09-06 6:25 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-06 6:17 Namhyung Kim [this message]
2012-09-06 6:23 ` Namhyung Kim
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1346912254-21526-1-git-send-email-namhyung@kernel.org \
--to=namhyung@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=minchan@kernel.org \
--cc=namhyung.kim@lge.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®