mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-29 22:01:27 -07:00
Fix ansible-test merge change detection.
This commit is contained in:
parent
d6bf45cd9d
commit
aa7fe919d3
2 changed files with 22 additions and 11 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue