diff options
author | Bob Van Landuyt <bob@gitlab.com> | 2019-08-13 18:41:25 +0300 |
---|---|---|
committer | Bob Van Landuyt <bob@gitlab.com> | 2019-08-13 18:41:25 +0300 |
commit | 3702ab7317533896c7455357dd6643181666f22b (patch) | |
tree | cd1a6ff66d7ac489922da4a6a38df6057f5cf172 /lib | |
parent | 530f7f6f0f3172d5712beb0a00c861ffa6935bd7 (diff) | |
parent | afe867921cab046a34bc463840c6e9f5d51f1f70 (diff) |
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.rb | 6 |
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) |