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 - begin
- diffs = @commit.show - 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) = render_commit_stats(stats: stats, diff: @commit.show, repo: @project.repo, commit: @commit)
.pull-right .pull-right

View File

@ -63,7 +63,7 @@ module Grit
end end
def diff(a, b, *paths) 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/ if diff =~ /diff --git a/
diff = diff.sub(/.*?(diff --git a)/m, '\1') diff = diff.sub(/.*?(diff --git a)/m, '\1')
else else
@ -82,7 +82,7 @@ module Grit
def diff_stats(a,b) def diff_stats(a,b)
stats = [] stats = []
Dir.chdir(path) do 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? while !lines.empty?
files = [] files = []
while lines.first =~ /^([-\d]+)\s+([-\d]+)\s+(.+)/ while lines.first =~ /^([-\d]+)\s+([-\d]+)\s+(.+)/