Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDouglas Barbosa Alexandre <dbalexandre@gmail.com>2017-12-19 22:42:51 +0300
committerDouglas Barbosa Alexandre <dbalexandre@gmail.com>2018-01-03 21:13:31 +0300
commitca089f59687fb8616bcbd3d5501fbc6006893e8f (patch)
tree4703188a886083c0b45f47f836b67bfc5fb9a88a /app/models/namespace.rb
parentbd90330740e0ea5c0ce0672fd605a463fcdfc898 (diff)
Update project full path in .git/config when renaming namespace
Diffstat (limited to 'app/models/namespace.rb')
-rw-r--r--app/models/namespace.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/app/models/namespace.rb b/app/models/namespace.rb
index 0ff169d4531..d983b2f106b 100644
--- a/app/models/namespace.rb
+++ b/app/models/namespace.rb
@@ -268,4 +268,11 @@ class Namespace < ActiveRecord::Base
def namespace_previously_created_with_same_path?
RedirectRoute.permanent.exists?(path: path)
end
+
+ def write_projects_full_path_config
+ all_projects.each do |project|
+ project.expires_full_path_cache # we need to clear cache to validate renames correctly
+ project.write_repository_config(:fullpath, project.full_path)
+ end
+ end
end