[stable-2.15] ansible-test - local change detection without --fork-point (#79734) (#80899)

(cherry picked from commit a5bb4c7dee)

Co-authored-by: Felix Fontein <felix@fontein.de>
pull/80928/head
Matt Clay 2 years ago committed by GitHub
parent 94b97c9c0b
commit 88042f98d6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -0,0 +1,2 @@
bugfixes:
- "ansible-test local change detection - use ``git merge-base <branch> HEAD`` instead of ``git merge-base --fork-point <branch>`` (https://github.com/ansible/ansible/pull/79734)."

@ -77,7 +77,7 @@ class Git:
def get_branch_fork_point(self, branch: str) -> str: def get_branch_fork_point(self, branch: str) -> str:
"""Return a reference to the point at which the given branch was forked.""" """Return a reference to the point at which the given branch was forked."""
cmd = ['merge-base', '--fork-point', branch] cmd = ['merge-base', branch, 'HEAD']
return self.run_git(cmd).strip() return self.run_git(cmd).strip()
def is_valid_ref(self, ref: str) -> bool: def is_valid_ref(self, ref: str) -> bool:

Loading…
Cancel
Save