From 6f690f458688ea813870af9ec2147d6075318c0e Mon Sep 17 00:00:00 2001 From: Alexander Machehin Date: Wed, 8 Apr 2015 19:24:36 +0500 Subject: [PATCH] diff: remove -M option --- app/views/projects/git/commits/_show.html.slim | 2 +- lib/ext/git/grit.rb | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/views/projects/git/commits/_show.html.slim b/app/views/projects/git/commits/_show.html.slim index 6ee3260ec..fa38dfc13 100644 --- a/app/views/projects/git/commits/_show.html.slim +++ b/app/views/projects/git/commits/_show.html.slim @@ -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 diff --git a/lib/ext/git/grit.rb b/lib/ext/git/grit.rb index c8a6fc423..4763e6e00 100644 --- a/lib/ext/git/grit.rb +++ b/lib/ext/git/grit.rb @@ -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+(.+)/