diff options
author | Robert Speicher <robert@gitlab.com> | 2017-03-30 14:56:43 +0000 |
---|---|---|
committer | Robert Speicher <robert@gitlab.com> | 2017-03-30 14:56:43 +0000 |
commit | bf0590b3e2799963494c0144275445a81bbc97af (patch) | |
tree | 0b280495efd539d1642095c1d64ebf13f6d567e6 /lib | |
parent | ecfbfbf4e186ede14881955d8e488699a710ac6d (diff) | |
parent | 53819c5ac6a9cdc2309224bf1d8cb5d8d2ad7a2d (diff) | |
download | gitlab-ce-bf0590b3e2799963494c0144275445a81bbc97af.tar.gz |
Merge branch 'allow-multiple-paths-in-repository-log' into 'master'
Support >1 path in Gitlab::Git::Repository#log
See merge request !10291
Diffstat (limited to 'lib')
-rw-r--r-- | lib/gitlab/git/repository.rb | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/gitlab/git/repository.rb b/lib/gitlab/git/repository.rb index 057f7748c3e..4e72519c81d 100644 --- a/lib/gitlab/git/repository.rb +++ b/lib/gitlab/git/repository.rb @@ -346,7 +346,12 @@ module Gitlab cmd << "--after=#{options[:after].iso8601}" if options[:after] cmd << "--before=#{options[:before].iso8601}" if options[:before] cmd << sha - cmd += %W[-- #{options[:path]}] if options[:path].present? + + # :path can be a string or an array of strings + if options[:path].present? + cmd << '--' + cmd += Array(options[:path]) + end raw_output = IO.popen(cmd) { |io| io.read } lines = offset_in_ruby ? raw_output.lines.drop(offset) : raw_output.lines |