diff options
author | James Lopez <james@jameslopez.es> | 2016-05-16 10:13:00 +0200 |
---|---|---|
committer | James Lopez <james@jameslopez.es> | 2016-05-16 10:13:00 +0200 |
commit | f386d7a7b7f67ba8e77ee40ef6a3383d5206d0c1 (patch) | |
tree | 561f071d858a52c68bd37c8c06e043db6314849f /lib/gitlab/import_export/command_line_util.rb | |
parent | 2dff04f24a8446216e12d43fab6841f28f3dd406 (diff) | |
download | gitlab-ce-f386d7a7b7f67ba8e77ee40ef6a3383d5206d0c1.tar.gz |
some changes based on MR feedback
Diffstat (limited to 'lib/gitlab/import_export/command_line_util.rb')
-rw-r--r-- | lib/gitlab/import_export/command_line_util.rb | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/gitlab/import_export/command_line_util.rb b/lib/gitlab/import_export/command_line_util.rb index c99b0d83b41..78664f076eb 100644 --- a/lib/gitlab/import_export/command_line_util.rb +++ b/lib/gitlab/import_export/command_line_util.rb @@ -9,11 +9,11 @@ module Gitlab untar_with_options(archive: archive, dir: dir, options: 'zxf') end - def git_bundle(git_bin_path: Gitlab.config.git.bin_path, repo_path:, bundle_path:) + def git_bundle(repo_path:, bundle_path:) execute(%W(#{git_bin_path} --git-dir=#{repo_path} bundle create #{bundle_path} --all)) end - def git_unbundle(git_bin_path: Gitlab.config.git.bin_path, repo_path:, bundle_path:) + def git_unbundle(repo_path:, bundle_path:) execute(%W(#{git_bin_path} clone --bare #{bundle_path} #{repo_path})) end @@ -31,6 +31,10 @@ module Gitlab _output, status = Gitlab::Popen.popen(cmd) status.zero? end + + def git_bin_path + Gitlab.config.git.bin_path + end end end end |