summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWolfram Sang <wsa@the-dreams.de>2017-04-27 17:28:55 +0200
committerWolfram Sang <wsa@the-dreams.de>2017-04-27 17:29:23 +0200
commit702be62bed5c1601cddb2fb2c60afe72b29f14f6 (patch)
tree759ac503bd866c514788829c3a2fbd1392bde43c
downloadsnippets-702be62bed5c1601cddb2fb2c60afe72b29f14f6.tar.gz
git: add praise-qa patch
See patch description for details. Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
-rw-r--r--git/0001-praise-qa.patch112
1 files changed, 112 insertions, 0 deletions
diff --git a/git/0001-praise-qa.patch b/git/0001-praise-qa.patch
new file mode 100644
index 0000000..207b744
--- /dev/null
+++ b/git/0001-praise-qa.patch
@@ -0,0 +1,112 @@
+From: Wolfram Sang <wsa@the-dreams.de>
+Subject: [RFC for GIT] request-pull: add praise to people doing QA
+
+Getting enough quality assurance is likely one of the bigger upcoming tasks for
+the Linux Kernel development process in the near future. To improve the
+situation, praise the people already doing that by adding their names to pull
+requests in the same manner that patch authors are credited. Here is an
+example, I once sent out [1]:
+
+=== standard pull-request
+
+The following changes since commit a121103c922847ba5010819a3f250f1f7fc84ab8:
+
+...
+
+Vlad Tsyrklevich (1):
+ i2c: fix kernel memory disclosure in dev interface
+
+=== new stuff starts here
+
+with much appreciated quality assurance from
+----------------------------------------------------------------
+Andy Shevchenko (1):
+ (Rev.) i2c: piix4: Avoid race conditions with IMC
+
+Benjamin Tissoires (1):
+ (Test) i2c: do not enable fall back to Host Notify by default
+
+Vladimir Zapolskiy (1):
+ (Rev.) i2c: print correct device invalid address
+
+=== diffstat, ...
+
+This patch is a hack and while the general idea was not objected upstream, this
+implementation was obviously not applicable [2]. I fully understand that, but
+due to lack of bandwith and knowledge of git internals, I will simply keep
+using this patch. Maybe this is useful for you, too.
+
+Note: while this patch applies to the git v2.11.0 sourcecode, it can be easily
+hacked to work on distribution packages or already installed versions. You
+only need to adapt the filenames of the patched 'git-request-pull.sh' file.
+
+Happy hacking,
+
+ Wolfram
+
+[1] https://lkml.org/lkml/2017/1/15/55
+[2] https://lkml.org/lkml/2017/1/15/164
+
+Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
+---
+ git-praise-qa.awk | 40 ++++++++++++++++++++++++++++++++++++++++
+ git-request-pull.sh | 1 +
+ 2 files changed, 41 insertions(+)
+
+Index: git-2.11.0/git-request-pull.sh
+===================================================================
+--- git-2.11.0.orig/git-request-pull.sh
++++ git-2.11.0/git-request-pull.sh
+@@ -155,6 +155,7 @@ then
+ fi &&
+
+ git shortlog ^$baserev $headrev &&
++git log --no-merges ^$baserev $headrev | git-praise-qa.awk &&
+ git diff -M --stat --summary $patch $merge_base..$headrev || status=1
+
+ exit $status
+Index: git-2.11.0/git-praise-qa.awk
+===================================================================
+--- /dev/null
++++ git-2.11.0/git-praise-qa.awk
+@@ -0,0 +1,40 @@
++#! /usr/bin/gawk -f
++# helper script to add a list of people who reviewed or tested patches to
++# git-request-pull.
++# Note: asorti() and length() with arrays are GNU extensions to awk
++# (c) Wolfram Sang, 2016-2017, GPL v2
++
++# New commit found, empty subject variable
++/^commit / { subject = "" }
++
++# Grab the subject line
++!subject && /^ / { subject = substr($0, 5); }
++
++# Scan for tags and get the type
++/^ Reviewed-by:/ { type = "Rev." }
++/^ Tested-by:/ { type = "Test" }
++
++# If tag and subject found, add it to list per contributor
++type && subject {
++ # Extract the name
++ sub(/^.*: /, ""); sub(/ <.*/, ""); name = $0;
++ # Collect tags given by 'name'
++ tags[name] = tags[name] " (" type ") " subject "\n";
++ count[name]++;
++ # Done, clear flag
++ type = "";
++}
++
++END {
++ if (length(tags)) {
++ print "\nwith much appreciated quality assurance from"
++ print "----------------------------------------------------------------"
++ # Sort by names
++ asorti(tags, sorted_names);
++ # printout in git style
++ for (i in sorted_names) {
++ name = sorted_names[i];
++ print name " (" count[name] "):" "\n" tags[name];
++ }
++ }
++}