Fix ansible-test merge change detection.

This commit is contained in:
Matt Clay 2018-11-14 11:30:48 -08:00
parent d6bf45cd9d
commit aa7fe919d3
2 changed files with 22 additions and 11 deletions

View file

@ -59,6 +59,24 @@ class Git(object):
cmd = ['symbolic-ref', '--short', 'HEAD']
return self.run_git(cmd).strip()
def get_rev_list(self, commits=None, max_count=None):
"""
:type commits: list[str] | None
:type max_count: int | None
:rtype: list[str]
"""
cmd = ['rev-list']
if commits:
cmd += commits
else:
cmd += ['HEAD']
if max_count:
cmd += ['--max-count', '%s' % max_count]
return self.run_git_split(cmd)
def get_branch_fork_point(self, branch):
"""
:type branch: str