# File lib/grit/commit.rb, line 182 def self.diff(repo, a, b = nil, paths = [], options = {}) if b.is_a?(Array) paths = b b = nil end paths.unshift("--") unless paths.empty? paths.unshift(b) unless b.nil? paths.unshift(a) options = {:full_index => true}.update(options) text = repo.git.diff(options, *paths) Diff.list_from_string(repo, text) end