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