Skip to content

Commit

Permalink
Merge pull request #11281 from bboozzoo/bboozzoo/email-check-when-no-git
Browse files Browse the repository at this point in the history
check-commit-email: do not fail when current dir is not under git
  • Loading branch information
mvo5 authored Jan 21, 2022
2 parents 4e01535 + 7ec49c0 commit 60152fa
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions check-commit-email.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
# like a developer would do locally in which case this ends up checking all
# commits locally - some day that may grow to be unwieldy but for now seems ok.

import os
import subprocess
from email.utils import parseaddr

Expand Down Expand Up @@ -39,6 +40,8 @@ def get_commit_range():


if __name__ == "__main__":
if not os.path.exists('.git'):
exit(0)
commitrange = get_commit_range()
args = ["git", "log", "--format=format:%h,%ce%n%h,%ae"]
if commitrange != "":
Expand Down

0 comments on commit 60152fa

Please sign in to comment.