summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorBob Van Landuyt <bob@gitlab.com>2019-08-13 15:41:25 +0000
committerBob Van Landuyt <bob@gitlab.com>2019-08-13 15:41:25 +0000
commit3702ab7317533896c7455357dd6643181666f22b (patch)
treecd1a6ff66d7ac489922da4a6a38df6057f5cf172 /lib
parent530f7f6f0f3172d5712beb0a00c861ffa6935bd7 (diff)
parentafe867921cab046a34bc463840c6e9f5d51f1f70 (diff)
downloadgitlab-ce-3702ab7317533896c7455357dd6643181666f22b.tar.gz
Merge branch '65803-invalidate-branches-cache-on-refresh' into 'master'
Only expire branch cache once per push See merge request gitlab-org/gitlab-ce!31653
Diffstat (limited to 'lib')
-rw-r--r--lib/gitlab/git_post_receive.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/gitlab/git_post_receive.rb b/lib/gitlab/git_post_receive.rb
index d98b85fecc4..6c7f23a673c 100644
--- a/lib/gitlab/git_post_receive.rb
+++ b/lib/gitlab/git_post_receive.rb
@@ -27,6 +27,12 @@ module Gitlab
end
end
+ def includes_branches?
+ enum_for(:changes_refs).any? do |_oldrev, _newrev, ref|
+ Gitlab::Git.branch_ref?(ref)
+ end
+ end
+
private
def deserialize_changes(changes)