summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorDouglas Barbosa Alexandre <dbalexandre@gmail.com>2017-12-19 18:04:48 -0200
committerDouglas Barbosa Alexandre <dbalexandre@gmail.com>2018-01-03 16:13:31 -0200
commit2f2233774c3d6416f5571a2e83b367d34bad3f5f (patch)
tree9d39e0b7ec584568f9990d8b5ac8167856481b88 /app
parentca089f59687fb8616bcbd3d5501fbc6006893e8f (diff)
downloadgitlab-ce-2f2233774c3d6416f5571a2e83b367d34bad3f5f.tar.gz
Write project full path to .git/config when migrating legacy storage
Diffstat (limited to 'app')
-rw-r--r--app/services/projects/hashed_storage/migrate_repository_service.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/app/services/projects/hashed_storage/migrate_repository_service.rb b/app/services/projects/hashed_storage/migrate_repository_service.rb
index 7212e7524ab..c076ce06278 100644
--- a/app/services/projects/hashed_storage/migrate_repository_service.rb
+++ b/app/services/projects/hashed_storage/migrate_repository_service.rb
@@ -39,6 +39,13 @@ module Projects
yield
end
+ # 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.
+ if result
+ project.write_repository_config(:fullpath, project.full_path)
+ end
+
result
end