diff options
author | Stan Hu <stanhu@gmail.com> | 2019-01-17 11:35:40 +0300 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2019-02-06 08:33:09 +0300 |
commit | a9ab6dbc637bc0a531760b0425d655a507827db3 (patch) | |
tree | 8260d2e0665248e9ce1c4b09f9f64596738dc45d /lib/gitlab/shell.rb | |
parent | 6bac612dc4545abcbbfc86477417f711e02427ba (diff) |
Refactor use of Shell.import_repository for Wikis
The previous behavior would pass in a list of parameters
to Shell, but we can improve this by using the WikiFormatter
and Project models to give us the same information.
Diffstat (limited to 'lib/gitlab/shell.rb')
-rw-r--r-- | lib/gitlab/shell.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/gitlab/shell.rb b/lib/gitlab/shell.rb index 6f896f03947..62fcc08ffdf 100644 --- a/lib/gitlab/shell.rb +++ b/lib/gitlab/shell.rb @@ -86,6 +86,14 @@ module Gitlab false end + def import_wiki_repository(project, wiki_formatter) + import_repository(project.repository_storage, wiki_formatter.disk_path, wiki_formatter.import_url, project.wiki.full_path) + end + + def import_project_repository(project) + import_repository(project.repository_storage, project.disk_path, project.import_url, project.full_path) + end + # Import repository # # storage - project's storage name |