diff --git a/changelogs/fragments/79734-ansible-test-change-detection.yml b/changelogs/fragments/79734-ansible-test-change-detection.yml new file mode 100644 index 00000000000..7eb939fd1d2 --- /dev/null +++ b/changelogs/fragments/79734-ansible-test-change-detection.yml @@ -0,0 +1,2 @@ +bugfixes: + - "ansible-test local change detection - use ``git merge-base HEAD`` instead of ``git merge-base --fork-point `` (https://github.com/ansible/ansible/pull/79734)." diff --git a/test/lib/ansible_test/_internal/git.py b/test/lib/ansible_test/_internal/git.py index 4685f1d28cf..b6c5c7b49d1 100644 --- a/test/lib/ansible_test/_internal/git.py +++ b/test/lib/ansible_test/_internal/git.py @@ -77,7 +77,7 @@ class Git: def get_branch_fork_point(self, branch: str) -> str: """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() def is_valid_ref(self, ref: str) -> bool: