提交 2de8fc3e 编写于 作者: T tiagonbotelho

removes inconsistency regarding tagging immediately as merged once you create...

removes inconsistency regarding tagging immediately as merged once you create a branch using new branch button and adds changelog entry
上级 4e963fed
......@@ -119,6 +119,8 @@ v 8.12.1
- Fix issue with search filter labels not displaying
v 8.12.0
v 8.12.0 (unreleased)
- Removes inconsistency regarding tagging immediatelly as merged once you create a new branch. !6408
- Update the rouge gem to 2.0.6, which adds highlighting support for JSX, Prometheus, and others. !6251
- Only check :can_resolve permission if the note is resolvable
- Bump fog-aws to v0.11.0 to support ap-south-1 region
......
......@@ -1013,13 +1013,17 @@ class Repository
branch_commit = commit(branch_name)
root_ref_commit = commit(root_ref)
if branch_commit
if branch_commit && !same_head?(branch_commit.id, root_ref_commit.id)
is_ancestor?(branch_commit.id, root_ref_commit.id)
else
nil
end
end
def same_head?(first_commit_id, second_commit_id)
first_commit_id == second_commit_id
end
def merge_base(first_commit_id, second_commit_id)
first_commit_id = commit(first_commit_id).try(:id) || first_commit_id
second_commit_id = commit(second_commit_id).try(:id) || second_commit_id
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册