diff: remove -M option

This commit is contained in:
Alexander Machehin 2015-04-08 19:24:36 +05:00
parent 06fbf84e10
commit 6f690f4586
2 changed files with 3 additions and 3 deletions

View File

@ -1,6 +1,6 @@
- begin
- diffs = @commit.show
- stats = Grit::CommitStats.find_all(@project.repo, @commit.sha, max_count: 1, skip: 0, M: true)[0][-1]
- stats = Grit::CommitStats.find_all(@project.repo, @commit.sha, max_count: 1, skip: 0)[0][-1]
= render_commit_stats(stats: stats, diff: @commit.show, repo: @project.repo, commit: @commit)
.pull-right

View File

@ -63,7 +63,7 @@ module Grit
end
def diff(a, b, *paths)
diff = self.git.native('diff', {M: true}, "#{a}...#{b}", '--', *paths)
diff = self.git.native('diff', {}, "#{a}...#{b}", '--', *paths)
if diff =~ /diff --git a/
diff = diff.sub(/.*?(diff --git a)/m, '\1')
else
@ -82,7 +82,7 @@ module Grit
def diff_stats(a,b)
stats = []
Dir.chdir(path) do
lines = self.git.native(:diff, {numstat: true, M: true}, "#{a}...#{b}").split("\n")
lines = self.git.native(:diff, {numstat: true}, "#{a}...#{b}").split("\n")
while !lines.empty?
files = []
while lines.first =~ /^([-\d]+)\s+([-\d]+)\s+(.+)/