summaryrefslogtreecommitdiff
path: root/lib/gitlab/git
diff options
context:
space:
mode:
authorRobert Schilling <rschilling@student.tugraz.at>2017-01-05 13:46:26 +0100
committerRobert Schilling <rschilling@student.tugraz.at>2017-01-05 13:46:26 +0100
commit22a34c81aa3801e5b453fd2c0a9364917e0aedbe (patch)
treec7d6cf6f1e799688e6b513ce4dbf36418eefe769 /lib/gitlab/git
parentefb8da895fb8d0976f98d0e54e36d9e61dccef89 (diff)
downloadgitlab-ce-22a34c81aa3801e5b453fd2c0a9364917e0aedbe.tar.gz
Use configured git rather than system gituse-configured-git
Diffstat (limited to 'lib/gitlab/git')
-rw-r--r--lib/gitlab/git/blame.rb2
-rw-r--r--lib/gitlab/git/repository.rb6
2 files changed, 4 insertions, 4 deletions
diff --git a/lib/gitlab/git/blame.rb b/lib/gitlab/git/blame.rb
index 46f3969b6e1..2913230e979 100644
--- a/lib/gitlab/git/blame.rb
+++ b/lib/gitlab/git/blame.rb
@@ -27,7 +27,7 @@ module Gitlab
private
def load_blame
- cmd = %W(git --git-dir=#{@repo.path} blame -p #{@sha} -- #{@path})
+ cmd = %W(#{Gitlab.config.git.bin_path} --git-dir=#{@repo.path} blame -p #{@sha} -- #{@path})
# Read in binary mode to ensure ASCII-8BIT
raw_output = IO.popen(cmd, 'rb') {|io| io.read }
output = encode_utf8(raw_output)
diff --git a/lib/gitlab/git/repository.rb b/lib/gitlab/git/repository.rb
index 963b326a730..79b23d59b3a 100644
--- a/lib/gitlab/git/repository.rb
+++ b/lib/gitlab/git/repository.rb
@@ -332,7 +332,7 @@ module Gitlab
end
def log_by_shell(sha, options)
- cmd = %W(git --git-dir=#{path} log)
+ cmd = %W(#{Gitlab.config.git.bin_path} --git-dir=#{path} log)
cmd += %W(-n #{options[:limit].to_i})
cmd += %w(--format=%H)
cmd += %W(--skip=#{options[:offset].to_i})
@@ -913,7 +913,7 @@ module Gitlab
return []
end
- cmd = %W(git --git-dir=#{path} ls-tree)
+ cmd = %W(#{Gitlab.config.git.bin_path} --git-dir=#{path} ls-tree)
cmd += %w(-r)
cmd += %w(--full-tree)
cmd += %w(--full-name)
@@ -1108,7 +1108,7 @@ module Gitlab
end
def archive_to_file(treeish = 'master', filename = 'archive.tar.gz', format = nil, compress_cmd = %w(gzip -n))
- git_archive_cmd = %W(git --git-dir=#{path} archive)
+ git_archive_cmd = %W(#{Gitlab.config.git.bin_path} --git-dir=#{path} archive)
# Put files into a directory before archiving
prefix = "#{archive_name(treeish)}/"