diff options
author | Douwe Maan <douwe@gitlab.com> | 2016-10-12 10:17:35 +0000 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2016-10-12 10:17:35 +0000 |
commit | d1eab555b6f38552841a7a1d956c241d91a6f2d4 (patch) | |
tree | bc4b6e856e2b9834d295f2fe9934a88e1d7ddf78 /app/models/repository.rb | |
parent | d3a9838065ab4cd4d1519f6d201b43c9a2b12f2c (diff) | |
parent | c90483406ecc2717076391737ff57167b5a03393 (diff) | |
download | gitlab-ce-d1eab555b6f38552841a7a1d956c241d91a6f2d4.tar.gz |
Merge branch '20708-new-branch-is-immediatelly-tagged-as-merged' into 'master'
Removes inconsistency regarding tagging immediately as merged once you create a …
- [x] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added
- [x] [Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md)
- [x] API support added
- Tests
- [x] Added for this feature/bug
- [x] All builds are passing
- [x] Conform by the [merge request performance guides](http://docs.gitlab.com/ce/development/merge_request_performance_guidelines.html)
- [x] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides)
- [x] Branch has no merge conflicts with `master` (if you do - rebase it please)
- [x] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits)
## What are the relevant issue numbers?
Closes #20708
See merge request !6408
Diffstat (limited to 'app/models/repository.rb')
-rw-r--r-- | app/models/repository.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/app/models/repository.rb b/app/models/repository.rb index 4da1933c189..608c99eed46 100644 --- a/app/models/repository.rb +++ b/app/models/repository.rb @@ -1016,7 +1016,8 @@ class Repository root_ref_commit = commit(root_ref) if branch_commit - is_ancestor?(branch_commit.id, root_ref_commit.id) + same_head = branch_commit.id == root_ref_commit.id + !same_head && is_ancestor?(branch_commit.id, root_ref_commit.id) else nil end |