diff options
author | Robert Speicher <rspeicher@gmail.com> | 2015-11-03 17:10:38 -0500 |
---|---|---|
committer | Robert Speicher <rspeicher@gmail.com> | 2015-11-03 17:11:09 -0500 |
commit | d09d62b6b875102b7a334fcf9e689537e1f25013 (patch) | |
tree | 4b6714fa07b8d4975131e68a9a293425ed85f665 /lib/backup | |
parent | 312375ac7c7d6619740899cd185a8dde1d653955 (diff) | |
download | gitlab-ce-d09d62b6b875102b7a334fcf9e689537e1f25013.tar.gz |
Replace all usages of `git` command with configurable binary pathrs-git-bin-path
Closes #3311
Diffstat (limited to 'lib/backup')
-rw-r--r-- | lib/backup/repository.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/backup/repository.rb b/lib/backup/repository.rb index 4d70f7883dd..a82a7e1f7bf 100644 --- a/lib/backup/repository.rb +++ b/lib/backup/repository.rb @@ -35,7 +35,7 @@ module Backup if wiki.repository.empty? $progress.puts " [SKIPPED]".cyan else - cmd = %W(git --git-dir=#{path_to_repo(wiki)} bundle create #{path_to_bundle(wiki)} --all) + cmd = %W(#{Gitlab.config.git.bin_path} --git-dir=#{path_to_repo(wiki)} bundle create #{path_to_bundle(wiki)} --all) output, status = Gitlab::Popen.popen(cmd) if status.zero? $progress.puts " [DONE]".green @@ -67,7 +67,7 @@ module Backup FileUtils.mkdir_p(path_to_repo(project)) cmd = %W(tar -xf #{path_to_bundle(project)} -C #{path_to_repo(project)}) else - cmd = %W(git init --bare #{path_to_repo(project)}) + cmd = %W(#{Gitlab.config.git.bin_path} init --bare #{path_to_repo(project)}) end if system(*cmd, silent) @@ -87,7 +87,7 @@ module Backup # that was initialized with ProjectWiki.new() and then # try to restore with 'git clone --bare'. FileUtils.rm_rf(path_to_repo(wiki)) - cmd = %W(git clone --bare #{path_to_bundle(wiki)} #{path_to_repo(wiki)}) + cmd = %W(#{Gitlab.config.git.bin_path} clone --bare #{path_to_bundle(wiki)} #{path_to_repo(wiki)}) if system(*cmd, silent) $progress.puts " [DONE]".green |