Merge "Fix base query for empty diff"

This commit is contained in:
Zuul 2022-10-17 11:26:02 +00:00 committed by Gerrit Code Review
commit 170d30c907
1 changed files with 4 additions and 0 deletions

View File

@ -445,6 +445,10 @@ def get_branch_base(workdir, repo, branch):
LOG.warning('failed to retrieve branch base: %s [%s]',
e, e.output.strip())
return None
if parents == '':
LOG.warning('branch base query result was empty for %s repository',
repo)
return None
parent = parents.splitlines()[-1]
# Now get the ^^! commit
cmd = [