Skip to content
This repository was archived by the owner on Apr 19, 2018. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions lib/grit/commit.rb
Original file line number Diff line number Diff line change
Expand Up @@ -207,11 +207,11 @@ def self.diff(repo, a, b = nil, paths = [], options = {})
Diff.list_from_string(repo, text)
end

def show
def show(options = {})
if parents.size > 1
diff = @repo.git.native(:diff, {:full_index => true}, "#{parents[0].id}...#{parents[1].id}")
diff = @repo.git.native(:diff, {:full_index => true}.update(options), "#{parents[0].id}...#{parents[1].id}")
else
diff = @repo.git.show({:full_index => true, :pretty => 'raw'}, @id)
diff = @repo.git.show({:full_index => true, :pretty => 'raw'}.update(options), @id)
end

if diff =~ /diff --git a/
Expand All @@ -228,7 +228,7 @@ def show
#
# Returns Grit::Diff[] (baked)
def diffs(options = {})
show
show(options)
end

def stats
Expand Down