aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--b4/ty.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/b4/ty.py b/b4/ty.py
index 008da09..8c61cd2 100644
--- a/b4/ty.py
+++ b/b4/ty.py
@@ -51,9 +51,11 @@ MY_COMMITS = None
BRANCH_INFO = None
-def git_get_merge_id(gitdir, commit_id):
+def git_get_merge_id(gitdir, commit_id, branch=None):
# get merge commit id
args = ['rev-list', '%s..' % commit_id, '--ancestry-path']
+ if branch is not None:
+ args += [branch]
lines = b4.git_get_command_lines(gitdir, args)
if not len(lines):
return None
@@ -117,7 +119,7 @@ def auto_locate_pr(gitdir, jsondata, branch):
return None
# Get the merge commit
- merge_commit_id = git_get_merge_id(gitdir, pr_commit_id)
+ merge_commit_id = git_get_merge_id(gitdir, pr_commit_id, branch)
if not merge_commit_id:
logger.debug('Could not get a merge commit-id for %s', pr_commit_id)
return None