summaryrefslogtreecommitdiff
path: root/app/models/concerns
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-07-20 09:22:29 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2021-07-20 09:22:29 +0000
commit61d81025139e2e6b3706c05eee4e60ff13417323 (patch)
tree517dc8ebc4a9f8d74fd77eb7bd6d5466d5184d94 /app/models/concerns
parent25fc1060affe576fd7c2f8aad586c5109c51cf7e (diff)
downloadgitlab-ce-61d81025139e2e6b3706c05eee4e60ff13417323.tar.gz
Add latest changes from gitlab-org/gitlab@14-0-stable-ee
Diffstat (limited to 'app/models/concerns')
-rw-r--r--app/models/concerns/has_repository.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/app/models/concerns/has_repository.rb b/app/models/concerns/has_repository.rb
index 33f6904bc91..1b4c590694a 100644
--- a/app/models/concerns/has_repository.rb
+++ b/app/models/concerns/has_repository.rb
@@ -14,6 +14,7 @@ module HasRepository
include Gitlab::Utils::StrongMemoize
delegate :base_dir, :disk_path, to: :storage
+ delegate :change_head, to: :repository
def valid_repo?
repository.exists?
@@ -117,4 +118,8 @@ module HasRepository
def repository_size_checker
raise NotImplementedError
end
+
+ def after_repository_change_head
+ reload_default_branch
+ end
end