From 54f00b74873f7d24fbb6125b0f35fca38fe033b7 Mon Sep 17 00:00:00 2001 From: James Lopez Date: Tue, 2 Jan 2018 10:38:51 +0100 Subject: [PATCH] fix wiki check --- lib/gitlab/bare_repository_import/importer.rb | 2 ++ spec/lib/gitlab/bare_repository_import/importer_spec.rb | 1 + 2 files changed, 3 insertions(+) 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