On Thu, 2020-03-26 at 12:35 +0000, Daniel P. BerrangΓ© wrote:
[...]
+for sha, subject in commits:
+
+ msg = subprocess.check_output(["git", "show", "-s",
sha],
+ universal_newlines=True)
+ lines = msg.strip().split("\n")
+
+ print("π %s %s" % (sha, subject))
I could personally live without the emoji...
+ sob = False
+ for line in lines:
+ if "Signed-off-by:" in line:
+ sob = True
+ if "localhost" in line:
+ print(" β FAIL: bad email in %s" % line)
+ errors = True
... but if you absolutely must have them, at least don't try to mess
with indentation - aligning text and emoji is basically never going
to work reliably anyway. Please consider applying the diff at the
end of this message if you think dropping the emoji is not an option.
Anyway, the rest looks good, so as long as you at least remove that
leading whitespace
Reviewed-by: Andrea Bolognani <abologna(a)redhat.com>
diff --git a/scripts/require-dco.py b/scripts/require-dco.py
index 3b642d6679..cb057e48b3 100755
--- a/scripts/require-dco.py
+++ b/scripts/require-dco.py
@@ -54,18 +54,20 @@ for sha, subject in commits:
universal_newlines=True)
lines = msg.strip().split("\n")
- print("π %s %s" % (sha, subject))
+ print(" %s %s " % (sha, subject), end="")
sob = False
for line in lines:
if "Signed-off-by:" in line:
sob = True
if "localhost" in line:
- print(" β FAIL: bad email in %s" % line)
+ print("β (FAIL: bad email in %s)" % line)
errors = True
if not sob:
- print(" β FAIL missing Signed-off-by tag")
+ print("β (FAIL: missing Signed-off-by tag)")
errors = True
+ else:
+ print("β
")
if errors:
print("""
--
Andrea Bolognani / Red Hat / Virtualization