{"thread":{"id":"42802","subject":"Git 2.8.1 - bug in patience diff algorithm when used with --ignore-space-at-eol?","startedAt":"2016-07-08T17:24:48Z","lastAt":"2016-07-09T07:27:01Z","messageCount":3,"participants":["Naja Melan","Johannes Schindelin"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"291043","messageId":"3153d359-2b82-d5e2-9e92-7a28bcd8bc48@autistici.org","threadId":"42802","inReplyTo":null,"subject":"Git 2.8.1 - bug in patience diff algorithm when used with --ignore-space-at-eol?","fromName":"Naja Melan","fromEmail":"najamelan@autistici.org","sentAt":"2016-07-08T16:51:00Z","receivedAt":"2016-07-08T17:24:48Z","isPatch":false,"sender":{"key":"najamelan@autistici.org","avatar":"https://gravatar.com/avatar/36a314e8a57b71b7c21efc189fcc9d4ee7d5ba7d0b328362c052f5bb32d613c5?d=mp&s=160"},"body":"When diffing with --patience and --ignore-space-at-eol, a change that\nadds or removes just one character a the end of a line isn't picked up.\n\nOther diff algorithms don't suffer from this and patience doesn't if I\ndon't put --ignore-space-at-eol.\n\nSee the following output for a proof:\n\n\n$ git diff --ignore-space-at-eol lib/gitomate/facts/path.rb\n\ndiff --git a/lib/gitomate/facts/path.rb b/lib/gitomate/facts/path.rb\nindex bc99661..a5cd184 100644\n--- a/lib/gitomate/facts/path.rb\n+++ b/lib/gitomate/facts/path.rb\n@@ -77,7 +77,7 @@ def check( update = false )\n      options( :exist ) and warn \"#{@info[ :path ].inspect} does not exist.\"\n      options( :exist ) or  warn \"#{@info[ :path ].inspect} exists but\nit shouldn't.\"\n\n-     @checked = true\n+     @checked = trued\n      return @checkPassed = false\n\n   end\n\n$ git diff --patience --ignore-space-at-eol lib/gitomate/facts/path.rb\n-> no output\n\n$ git diff --patience lib/gitomate/facts/path.rb\n\ndiff --git a/lib/gitomate/facts/path.rb b/lib/gitomate/facts/path.rb\nindex bc99661..a5cd184 100644\n--- a/lib/gitomate/facts/path.rb\n+++ b/lib/gitomate/facts/path.rb\n@@ -77,7 +77,7 @@ def check( update = false )\n      options( :exist ) and warn \"#{@info[ :path ].inspect} does not exist.\"\n      options( :exist ) or  warn \"#{@info[ :path ].inspect} exists but\nit shouldn't.\"\n\n-     @checked = true\n+     @checked = trued\n      return @checkPassed = false\n\n   end\n\n\nNaja Melan\n"},{"id":"291092","messageId":"alpine.DEB.2.20.1607090823270.6426@virtualbox","threadId":"42802","inReplyTo":"3153d359-2b82-d5e2-9e92-7a28bcd8bc48@autistici.org","subject":"Re: Git 2.8.1 - bug in patience diff algorithm when used with --ignore-space-at-eol?","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2016-07-09T06:24:50Z","receivedAt":"2016-07-09T06:25:01Z","isPatch":false,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi Naja,\n\nOn Fri, 8 Jul 2016, Naja Melan wrote:\n\n> When diffing with --patience and --ignore-space-at-eol, a change that\n> adds or removes just one character a the end of a line isn't picked up.\n\nConfirmed with the current 'master'. I am on it, building on top of this\ndiff:\n\n-- snipsnap --\ndiff --git a/t/t4033-diff-patience.sh b/t/t4033-diff-patience.sh\nindex 3c9932e..6da435b 100755\n--- a/t/t4033-diff-patience.sh\n+++ b/t/t4033-diff-patience.sh\n@@ -5,6 +5,13 @@ test_description='patience diff algorithm'\n . ./test-lib.sh\n . \"$TEST_DIRECTORY\"/lib-diff-alternative.sh\n \n+test_expect_failure '--ignore-space-at-eol with a single appended character' '\n+\tprintf \"a\\nb\\nc\\n\" >pre &&\n+\tprintf \"a\\nbX\\nc\\n\" >post &&\n+\tgit diff --no-index --patience --ignore-space-at-eol pre post >diff &&\n+\tgrep \"^+.*X\" diff\n+'\n+\n test_diff_frobnitz \"patience\"\n \n test_diff_unique \"patience\"\n"},{"id":"291098","messageId":"alpine.DEB.2.20.1607090924490.6426@virtualbox","threadId":"42802","inReplyTo":"alpine.DEB.2.20.1607090823270.6426@virtualbox","subject":"Re: Git 2.8.1 - bug in patience diff algorithm when used with --ignore-space-at-eol?","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2016-07-09T07:26:47Z","receivedAt":"2016-07-09T07:27:01Z","isPatch":false,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Sat, 9 Jul 2016, Johannes Schindelin wrote:\n\n> On Fri, 8 Jul 2016, Naja Melan wrote:\n> \n> > When diffing with --patience and --ignore-space-at-eol, a change that\n> > adds or removes just one character a the end of a line isn't picked up.\n> \n> Confirmed with the current 'master'. I am on it [...]\n\nAnd I fixed it:\n\nhttp://thread.gmane.org/gmane.comp.version-control.git/299176/focus=299178\n\nCiao,\nJohannes\n"}]}