# File lib/gitlab_git/repository.rb, line 334 def log_by_shell(sha, options) cmd = ??(git --git-dir=#{path} log) cmd += ??(-n #{options[:limit].to_i}) cmd += ??(--format=??) cmd += ??(--skip=#{options[:offset].to_i}) cmd += ??(--follow) if options[:follow] cmd += ??(--no-merges) if options[:skip_merges] cmd += ??(--after=#{options[:after].iso8601}) if options[:after] cmd += ??(--before=#{options[:before].iso8601}) if options[:before] cmd += [sha] cmd += ??(-- #{options[:path]}) if options[:path].present? raw_output = IO.popen(cmd) {|io| io.read } log = raw_output.lines.map do |c| Rugged::Commit.new(rugged, c.strip) end log.is_a?(Array) ? log : [] end