From 25d999b468f237be12ae445f8c07edc7a9f87687 Mon Sep 17 00:00:00 2001 From: Markus Schirp Date: Mon, 24 Dec 2018 16:23:58 +0000 Subject: [PATCH] Add whitespace filter to incremental mode [Fix #441] --- lib/mutant/repository.rb | 1 + spec/unit/mutant/repository/diff_spec.rb | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/mutant/repository.rb b/lib/mutant/repository.rb index 963516a9..a2316f01 100644 --- a/lib/mutant/repository.rb +++ b/lib/mutant/repository.rb @@ -41,6 +41,7 @@ module Mutant command = %W[ git log #{from}...#{to} + --ignore-all-space -L #{line_range.begin},#{line_range.end}:#{path} ] diff --git a/spec/unit/mutant/repository/diff_spec.rb b/spec/unit/mutant/repository/diff_spec.rb index 6ba60965..a19ac9a9 100644 --- a/spec/unit/mutant/repository/diff_spec.rb +++ b/spec/unit/mutant/repository/diff_spec.rb @@ -75,7 +75,7 @@ describe Mutant::Repository::Diff do end let(:expected_git_log_command) do - %W[git log from_rev...to_rev -L 1,2:#{path}] + %W[git log from_rev...to_rev --ignore-all-space -L 1,2:#{path}] end context 'on failure of git log command' do