summaryrefslogtreecommitdiff
path: root/lib/tasks/gitlab
diff options
context:
space:
mode:
authorRobert Speicher <rspeicher@gmail.com>2015-11-03 17:10:38 -0500
committerRobert Speicher <rspeicher@gmail.com>2015-11-03 17:11:09 -0500
commitd09d62b6b875102b7a334fcf9e689537e1f25013 (patch)
tree4b6714fa07b8d4975131e68a9a293425ed85f665 /lib/tasks/gitlab
parent312375ac7c7d6619740899cd185a8dde1d653955 (diff)
downloadgitlab-ce-rs-git-bin-path.tar.gz
Replace all usages of `git` command with configurable binary pathrs-git-bin-path
Closes #3311
Diffstat (limited to 'lib/tasks/gitlab')
-rw-r--r--lib/tasks/gitlab/check.rake2
-rw-r--r--lib/tasks/gitlab/shell.rake10
2 files changed, 6 insertions, 6 deletions
diff --git a/lib/tasks/gitlab/check.rake b/lib/tasks/gitlab/check.rake
index 2e73f792a9d..a25fac62cfc 100644
--- a/lib/tasks/gitlab/check.rake
+++ b/lib/tasks/gitlab/check.rake
@@ -824,7 +824,7 @@ namespace :gitlab do
repo_dirs = Dir.glob(File.join(namespace_dir, '*'))
repo_dirs.each do |dir|
puts "\nChecking repo at #{dir}"
- system(*%w(git fsck), chdir: dir)
+ system(*%W(#{Gitlab.config.git.bin_path} fsck), chdir: dir)
end
end
end
diff --git a/lib/tasks/gitlab/shell.rake b/lib/tasks/gitlab/shell.rake
index 3c0cc763d17..dd61632e557 100644
--- a/lib/tasks/gitlab/shell.rake
+++ b/lib/tasks/gitlab/shell.rake
@@ -17,7 +17,7 @@ namespace :gitlab do
# Clone if needed
unless File.directory?(target_dir)
- system(*%W(git clone -- #{args.repo} #{target_dir}))
+ system(*%W(#{Gitlab.config.git.bin_path} clone -- #{args.repo} #{target_dir}))
end
# Make sure we're on the right tag
@@ -27,7 +27,7 @@ namespace :gitlab do
reseted = reset_to_commit(args)
unless reseted
- system(*%W(git fetch origin))
+ system(*%W(#{Gitlab.config.git.bin_path} fetch origin))
reset_to_commit(args)
end
@@ -128,14 +128,14 @@ namespace :gitlab do
end
def reset_to_commit(args)
- tag, status = Gitlab::Popen.popen(%W(git describe -- #{args.tag}))
+ tag, status = Gitlab::Popen.popen(%W(#{Gitlab.config.git.bin_path} describe -- #{args.tag}))
unless status.zero?
- tag, status = Gitlab::Popen.popen(%W(git describe -- origin/#{args.tag}))
+ tag, status = Gitlab::Popen.popen(%W(#{Gitlab.config.git.bin_path} describe -- origin/#{args.tag}))
end
tag = tag.strip
- system(*%W(git reset --hard #{tag}))
+ system(*%W(#{Gitlab.config.git.bin_path} reset --hard #{tag}))
end
end