summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Tauner <stefan.tauner@gmx.at>2017-10-04 02:56:31 +0200
committerNico Huber <nico.h@gmx.de>2017-10-05 10:46:33 +0000
commitf3f996e33ddae9bed8d29f27c9f81516478e65ce (patch)
treeebc5236fe001d0b657cb1158490dcca2c5f562ad
parent3a937b77320f24b648306d90063df39cd08cf633 (diff)
downloadflashrom-f3f996e33ddae9bed8d29f27c9f81516478e65ce.tar.gz
flashrom-f3f996e33ddae9bed8d29f27c9f81516478e65ce.tar.bz2
flashrom-f3f996e33ddae9bed8d29f27c9f81516478e65ce.zip
fixup! Convert flashrom to git
- update the commit-msg to check for duplicate signoffs/acks Change-Id: Ia36147e673cceb6d175884b40d4bdd00015b96dc Signed-off-by: Stefan Tauner <stefan.tauner@gmx.at> Reviewed-on: https://review.coreboot.org/21833 Reviewed-by: Nico Huber <nico.h@gmx.de> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
-rwxr-xr-xutil/git-hooks/commit-msg19
1 files changed, 18 insertions, 1 deletions
diff --git a/util/git-hooks/commit-msg b/util/git-hooks/commit-msg
index 3b3d54155..b9217e081 100755
--- a/util/git-hooks/commit-msg
+++ b/util/git-hooks/commit-msg
@@ -6,6 +6,10 @@
#
# Copyright (C) 2009 The Android Open Source Project
#
+# Any other changes including test_duplicate_signoffs_acks
+#
+# Copyright (C) 2017 Stefan Tauner
+#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
@@ -188,5 +192,18 @@ _gen_ChangeId() {
git hash-object -t commit --stdin
}
+# Test for duplicate signoffs/acks
+test_duplicate_signoffs_acks() {
+ test "" = "$(grep -i '^(Signed-off-by|Acked-by): ' "$MSG" |
+ sort | uniq -c | sed -e '/^[[:space:]]*1[[:space:]]/d')" || {
+ echo "Duplicate Signed-off-by or Acked-by lines." >&2
+ exit 1
+ }
+}
+
+main() {
+ test_duplicate_signoffs_acks
+ add_ChangeId
+}
-add_ChangeId
+main