diff --git a/util/git-tag-check/git-tag-check.py b/util/git-tag-check/git-tag-check.py index 2efabb36a0..d729cdf5e5 100644 --- a/util/git-tag-check/git-tag-check.py +++ b/util/git-tag-check/git-tag-check.py @@ -57,12 +57,12 @@ def is_tag_reachable(tag: str, branch: str) -> bool: tag_sha = get_commit_sha(tag) branch_sha = get_commit_sha(branch) if tag_sha != branch_sha: - result = run_git_command( + # An exception will occur if the return code != 0 + run_git_command( ['git', '-C', str(REPO_PATH), 'merge-base', '--is-ancestor', tag, branch], f"Error checking if {tag} is ancestor of {branch}" ) - # This return should always be true as an exception will occur if the return code != 0 - return result.returncode == 0 + return True