Chromium Code Reviews| Index: webrtc/tools/author_line_count.sh |
| diff --git a/webrtc/tools/author_line_count.sh b/webrtc/tools/author_line_count.sh |
| new file mode 100755 |
| index 0000000000000000000000000000000000000000..0bd61ee521614d156e28b0d334f8c720f62f86fc |
| --- /dev/null |
| +++ b/webrtc/tools/author_line_count.sh |
| @@ -0,0 +1,25 @@ |
| +#! /bin/bash |
| + |
| +# Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. |
| +# |
| +# Use of this source code is governed by a BSD-style license |
| +# that can be found in the LICENSE file in the root of the source |
| +# tree. An additional intellectual property rights grant can be found |
| +# in the file PATENTS. All contributing project authors may |
| +# be found in the AUTHORS file in the root of the source tree. |
| + |
| +# This script counts net line count contributions by author. Besides |
| +# amusement, the value of these stats are of course questionable. |
| + |
| +git log "$@" --pretty=format:%ae --shortstat | sed '/^ /s/,/\n/g' | gawk ' |
|
kjellander_webrtc
2016/06/14 14:11:12
nit: Pipelines should be split one per line if the
nisse-webrtc
2016/06/15 06:55:23
Done.
|
| +/^[^ ]/ { |
| + /* Some author "email addresses" have a trailing @svn-id, strip that out. */ |
| + author = gensub(/^([^@]*@[^@]*).*/, "\\1", "", $1); |
| +} |
| +/^ .*insertion/ { total[author] += $1 } |
| +/^ .*deletion/ { total[author] -= $1 } |
| +END { for (author in total) { |
| + print total[author], author |
| + } |
| +} |
| +' | sort -nr |