diff --git a/lib/git/object.rb b/lib/git/object.rb index 7a190ea7..826315aa 100644 --- a/lib/git/object.rb +++ b/lib/git/object.rb @@ -53,8 +53,9 @@ def grep(string, path_limiter = nil, opts = {}) @base.lib.grep(string, opts) end - def diff(objectish) - Git::Diff.new(@base, @objectish, objectish) + def diff(objectish,inverse) + return Git::Diff.new(@base, @objectish, objectish) unless inverse + Git::Diff.new(@base, objectish, @objectish) end def log(count = 30) @@ -203,8 +204,8 @@ def committer_date end alias_method :date, :committer_date - def diff_parent - diff(parent) + def diff_parent(inverse=false) + diff(parent,inverse) end def set_commit(data)