diff options
author | Martin Liska <mliska@suse.cz> | 2020-05-13 14:44:22 +0200 |
---|---|---|
committer | Martin Liska <mliska@suse.cz> | 2020-05-13 14:44:22 +0200 |
commit | e4f0e06b2f50594ce13153319337c0eb8d9b2589 (patch) | |
tree | 0fb16b378eaed834a9cd0ae33f018daa0dc47c3a /contrib/gcc-changelog | |
parent | b8333fc6f87655c3c1b9c93129b88d239b2fcaf9 (diff) | |
download | gcc-e4f0e06b2f50594ce13153319337c0eb8d9b2589.zip gcc-e4f0e06b2f50594ce13153319337c0eb8d9b2589.tar.gz gcc-e4f0e06b2f50594ce13153319337c0eb8d9b2589.tar.bz2 |
Add default revisions argument for git_check_commit.py.
* gcc-changelog/git_check_commit.py: Add default argument HEAD
for revisions and improve error message output.
Diffstat (limited to 'contrib/gcc-changelog')
-rwxr-xr-x | contrib/gcc-changelog/git_check_commit.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/contrib/gcc-changelog/git_check_commit.py b/contrib/gcc-changelog/git_check_commit.py index b2d1d08..8553c90 100755 --- a/contrib/gcc-changelog/git_check_commit.py +++ b/contrib/gcc-changelog/git_check_commit.py @@ -22,7 +22,7 @@ from git_repository import parse_git_revisions parser = argparse.ArgumentParser(description='Check git ChangeLog format ' 'of a commit') -parser.add_argument('revisions', +parser.add_argument('revisions', default='HEAD', nargs='?', help='Git revisions (e.g. hash~5..hash or just hash)') parser.add_argument('-g', '--git-path', default='.', help='Path to git repository') @@ -36,9 +36,9 @@ args = parser.parse_args() retval = 0 for git_commit in parse_git_revisions(args.git_path, args.revisions, not args.allow_non_strict_mode): - print('Checking %s' % git_commit.hexsha) + res = 'OK' if git_commit.success else 'FAILED' + print('Checking %s: %s' % (git_commit.hexsha, res)) if git_commit.success: - print('OK') if args.print_changelog: git_commit.print_output() else: |