git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Schindelin <Johannes.Schindelin@gmx.de>
To: Naja Melan <najamelan@autistici.org>
Cc: git@vger.kernel.org
Subject: Re: Git 2.8.1 - bug in patience diff algorithm when used with --ignore-space-at-eol?
Date: Sat, 9 Jul 2016 08:24:50 +0200 (CEST)	[thread overview]
Message-ID: <alpine.DEB.2.20.1607090823270.6426@virtualbox> (raw)
In-Reply-To: <3153d359-2b82-d5e2-9e92-7a28bcd8bc48@autistici.org>

Hi Naja,

On Fri, 8 Jul 2016, Naja Melan wrote:

> When diffing with --patience and --ignore-space-at-eol, a change that
> adds or removes just one character a the end of a line isn't picked up.

Confirmed with the current 'master'. I am on it, building on top of this
diff:

-- snipsnap --
diff --git a/t/t4033-diff-patience.sh b/t/t4033-diff-patience.sh
index 3c9932e..6da435b 100755
--- a/t/t4033-diff-patience.sh
+++ b/t/t4033-diff-patience.sh
@@ -5,6 +5,13 @@ test_description='patience diff algorithm'
 . ./test-lib.sh
 . "$TEST_DIRECTORY"/lib-diff-alternative.sh
 
+test_expect_failure '--ignore-space-at-eol with a single appended character' '
+	printf "a\nb\nc\n" >pre &&
+	printf "a\nbX\nc\n" >post &&
+	git diff --no-index --patience --ignore-space-at-eol pre post >diff &&
+	grep "^+.*X" diff
+'
+
 test_diff_frobnitz "patience"
 
 test_diff_unique "patience"

  reply	other threads:[~2016-07-09  6:24 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-08 16:51 Git 2.8.1 - bug in patience diff algorithm when used with --ignore-space-at-eol? Naja Melan
2016-07-09  6:24 ` Johannes Schindelin [this message]
2016-07-09  7:26   ` Johannes Schindelin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.DEB.2.20.1607090823270.6426@virtualbox \
    --to=johannes.schindelin@gmx.de \
    --cc=git@vger.kernel.org \
    --cc=najamelan@autistici.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).