diff options
author | Douglas Barbosa Alexandre <dbalexandre@gmail.com> | 2017-12-19 14:53:59 -0200 |
---|---|---|
committer | Douglas Barbosa Alexandre <dbalexandre@gmail.com> | 2018-01-03 16:13:31 -0200 |
commit | 64fe954dcebaadd6f686f30eb4ff0be5ebcf172d (patch) | |
tree | 3fe3ac6a13ff0c9d5c722c06b06238d64712965e /app/models | |
parent | 9504a529b758b0352b9c60d67fda8b4ee2a5fec0 (diff) | |
download | gitlab-ce-64fe954dcebaadd6f686f30eb4ff0be5ebcf172d.tar.gz |
Update project full path in .git/config when renaming a repository
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/project.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/app/models/project.rb b/app/models/project.rb index eac78de1ac9..1182dbda0c0 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -1420,6 +1420,11 @@ class Project < ActiveRecord::Base end def after_rename_repo + # We'd need to keep track of project full path otherwise directory tree + # created with hashed storage enabled cannot be usefully imported using + # the import rake task. + write_repository_config(:fullpath, full_path) + path_before_change = previous_changes['path'].first # We need to check if project had been rolled out to move resource to hashed storage or not and decide |