diff options
author | James Lopez <james@jameslopez.es> | 2018-01-02 10:38:51 +0100 |
---|---|---|
committer | James Lopez <james@jameslopez.es> | 2018-01-02 10:42:18 +0100 |
commit | 54f00b74873f7d24fbb6125b0f35fca38fe033b7 (patch) | |
tree | 821b7127276f390eb8eab40d44e801c4cc0a0057 | |
parent | 9d0bceb3f012aa7a9c412f83dfc775a7f99f4729 (diff) | |
download | gitlab-ce-54f00b74873f7d24fbb6125b0f35fca38fe033b7.tar.gz |
fix wiki check
-rw-r--r-- | lib/gitlab/bare_repository_import/importer.rb | 2 | ||||
-rw-r--r-- | spec/lib/gitlab/bare_repository_import/importer_spec.rb | 1 |
2 files changed, 3 insertions, 0 deletions
diff --git a/lib/gitlab/bare_repository_import/importer.rb b/lib/gitlab/bare_repository_import/importer.rb index b0b349088d9..3fa2a7e8dfe 100644 --- a/lib/gitlab/bare_repository_import/importer.rb +++ b/lib/gitlab/bare_repository_import/importer.rb @@ -77,6 +77,8 @@ module Gitlab if bare_repo.wiki_exists? FileUtils.mv(wiki_path, File.join(project.repository_storage_path, project.disk_path + '.wiki.git')) + else + project.create_wiki end true diff --git a/spec/lib/gitlab/bare_repository_import/importer_spec.rb b/spec/lib/gitlab/bare_repository_import/importer_spec.rb index 07cc73ee479..9fadfadeddd 100644 --- a/spec/lib/gitlab/bare_repository_import/importer_spec.rb +++ b/spec/lib/gitlab/bare_repository_import/importer_spec.rb @@ -137,6 +137,7 @@ describe Gitlab::BareRepositoryImport::Importer, repository: true do project = Project.find_by_full_path("#{admin.full_path}/#{project_path}") expect(File).to exist(File.join(project.repository_storage_path, project.disk_path + '.git')) + expect(File).to exist(File.join(project.repository_storage_path, project.disk_path + '.wiki.git')) end it 'moves an existing project to the correct path' do |