Skip to content

Commit e2d3372

Browse files
committed
lint: Disable signature output in git log
Necessary for users that have signature output enabled by default, since the script would stumble on them and error out.
1 parent 62bd61d commit e2d3372

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/lint/lint-git-commit-check.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,10 @@ def main():
3636
assert os.getenv("COMMIT_RANGE") # E.g. COMMIT_RANGE='HEAD~n..HEAD'
3737
commit_range = os.getenv("COMMIT_RANGE")
3838

39-
commit_hashes = check_output(["git", "log", commit_range, "--format=%H"], text=True, encoding="utf8").splitlines()
39+
commit_hashes = check_output(["git", "-c", "log.showSignature=false", "log", commit_range, "--format=%H"], text=True, encoding="utf8").splitlines()
4040

4141
for hash in commit_hashes:
42-
commit_info = check_output(["git", "log", "--format=%B", "-n", "1", hash], text=True, encoding="utf8").splitlines()
42+
commit_info = check_output(["git", "-c", "log.showSignature=false", "log", "--format=%B", "-n", "1", hash], text=True, encoding="utf8").splitlines()
4343
if len(commit_info) >= 2:
4444
if commit_info[1]:
4545
print(f"The subject line of commit hash {hash} is followed by a non-empty line. Subject lines should always be followed by a blank line.")

0 commit comments

Comments
 (0)