diff options
Diffstat (limited to 'lib/gitlab/github_import/importer/repository_importer.rb')
-rw-r--r-- | lib/gitlab/github_import/importer/repository_importer.rb | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/lib/gitlab/github_import/importer/repository_importer.rb b/lib/gitlab/github_import/importer/repository_importer.rb index 1401c92a44e..20068a33019 100644 --- a/lib/gitlab/github_import/importer/repository_importer.rb +++ b/lib/gitlab/github_import/importer/repository_importer.rb @@ -50,7 +50,7 @@ module Gitlab project.ensure_repository refmap = Gitlab::GithubImport.refmap - project.repository.fetch_as_mirror(project.import_url, refmap: refmap, forced: true, remote_name: 'github') + project.repository.fetch_as_mirror(project.import_url, refmap: refmap, forced: true) project.change_head(default_branch) if default_branch @@ -59,8 +59,6 @@ module Gitlab Repositories::HousekeepingService.new(project, :gc).execute true - rescue Gitlab::Git::Repository::NoRepository, Gitlab::Shell::Error => e - fail_import("Failed to import the repository: #{e.message}") end def import_wiki_repository @@ -70,7 +68,8 @@ module Gitlab rescue ::Gitlab::Git::CommandError => e if e.message !~ /repository not exported/ project.create_wiki - fail_import("Failed to import the wiki: #{e.message}") + + raise e else true end @@ -84,11 +83,6 @@ module Gitlab project.update_column(:last_repository_updated_at, Time.zone.now) end - def fail_import(message) - project.import_state.mark_as_failed(message) - false - end - private def default_branch |