summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-12-07 19:37:05 +0100
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-12-07 19:37:05 +0100
commit2cec90254f5753ac1a8b92931613aaa6c9f19cf7 (patch)
tree81d878d1c417b63955242e99f2a96d08177e4f0f
parent24c7eafb295a292ed5eb166688d638f7d3278261 (diff)
downloadgitlab-ce-2cec90254f5753ac1a8b92931613aaa6c9f19cf7.tar.gz
Dont use cached collection for Repository find_branch and find_tag methods
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
-rw-r--r--CHANGELOG1
-rw-r--r--app/models/repository.rb4
2 files changed, 3 insertions, 2 deletions
diff --git a/CHANGELOG b/CHANGELOG
index 13207552e8e..f1ee21ec368 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -14,6 +14,7 @@ v 8.3.0 (unreleased)
- Expose events API with comment information and author info
- Fix: Ensure "Remove Source Branch" button is not shown when branch is being deleted. #3583
- Run custom Git hooks when branch is created or deleted.
+ - Fix bug when simultaneously accepting multiple MRs results in MRs that are of "merged" status, but not merged to the target branch
v 8.2.3
- Fix application settings cache not expiring after changes (Stan Hu)
diff --git a/app/models/repository.rb b/app/models/repository.rb
index c304955b0b3..1d43307e1e7 100644
--- a/app/models/repository.rb
+++ b/app/models/repository.rb
@@ -100,11 +100,11 @@ class Repository
end
def find_branch(name)
- branches.find { |branch| branch.name == name }
+ raw_repository.branches.find { |branch| branch.name == name }
end
def find_tag(name)
- tags.find { |tag| tag.name == name }
+ raw_repository.tags.find { |tag| tag.name == name }
end
def add_branch(user, branch_name, target)