Update common.py

Add in a check to confirm we get the original root commit has in case there are multiple. This can occur when two separate repositories are merged in to one new one. Without this addition the count will always return 0.
This commit is contained in:
adamladd17 2019-09-04 12:56:54 -04:00 committed by GitHub
parent d6c7824177
commit 8b02dbed00
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -917,6 +917,7 @@ def get_commit_count(tag, commit_id):
debug("going to use number of commits from initial commit")
(status, output) = getstatusoutput(
"git rev-list --max-parents=0 HEAD")
output = output.split("\n")[-1]
if status == 0:
# output is now inital commit
(status, output) = getstatusoutput(