mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 13:45:38 +00:00
scripts: avoid error in DCO check on empty branches
If the DCO check is run on an empty branch (ie one which has no commits different from master), it throws an error due to trying to interpret the empty string as a git commit SHA. Reviewed-by: Andrea Bolognani <abologna@redhat.com> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
parent
b9166baebe
commit
769ff77c9c
@ -46,7 +46,10 @@ print("\nChecking for 'Signed-off-by: NAME <EMAIL>' on all commits since %s...\n
|
||||
log = subprocess.check_output(["git", "log", "--format=%H %s", ancestor + "..."],
|
||||
universal_newlines=True)
|
||||
|
||||
commits = [[c[0:40], c[41:]] for c in log.strip().split("\n")]
|
||||
if log == "":
|
||||
commits = []
|
||||
else:
|
||||
commits = [[c[0:40], c[41:]] for c in log.strip().split("\n")]
|
||||
|
||||
for sha, subject in commits:
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user