[PATCH] Fix '\ No newline...' annotation in rewrite diffs

2012-08-05 Thread Adam Butcher
mal output without -B does not have this problem). Add a LF after the incomplete line before writing the "\ No newline ..." out to fix this. Add a couple of tests to confirm that the indicator comment is generated on its own line in both plain diff and rewrite mode. Signed-off-by: Adam B

Re: [PATCH] tests: Introduce test_seq

2012-08-04 Thread Adam Butcher
MichaƂ Kiedrowicz gmail.com> writes: > Junio C Hamano pobox.com> wrote: > > diff --git a/t/test-lib-functions.sh b/t/test-lib-functions.sh > > index c8b4ae3..7dc70eb 100644 > > --- a/t/test-lib-functions.sh > > +++ b/t/test-lib-functions.sh > > @@ -543,11 +543,12 @@ test_cmp() { > > # done > >

Re: [PATCH] Fix 'No newline...' annotation in rewrite diffs.

2012-08-04 Thread Adam Butcher
When operating in --break-rewrites (-B) mode on a file with no newline terminator (and assuming --break-rewrites determines that the diff _is_ a rewrite), git diff previously concatenated the indicator comment '\ No newline at end of file' directly to the terminating line rather than on a line of i

Re: [PATCH] Fix 'No newline...' annotation in rewrite diffs.

2012-08-02 Thread Adam Butcher
On 02.08.2012 23:00, Junio C Hamano wrote: Adam Butcher writes: +# create a file containing numbers with no newline at +# the end and modify it such that the starting 10 lines +# are unchanged, the next 101 are rewritten and the last +# line differs only in that in is terminated by a newline

Re: [PATCH] Fix 'No newline...' annotation in rewrite diffs.

2012-08-02 Thread Adam Butcher
On 02.08.2012 22:33, Jeff King wrote: On Thu, Aug 02, 2012 at 10:11:02PM +0100, Adam Butcher wrote: From 01730a741cc5fd7d0a5d8bd0d3df80d12c81fe48 Mon Sep 17 00:00:00 2001 From: Adam Butcher Date: Wed, 1 Aug 2012 22:25:09 +0100 Subject: [PATCH] Fix 'No newline...' annotation in rew

[PATCH] Fix 'No newline...' annotation in rewrite diffs.

2012-08-02 Thread Adam Butcher
From 01730a741cc5fd7d0a5d8bd0d3df80d12c81fe48 Mon Sep 17 00:00:00 2001 From: Adam Butcher Date: Wed, 1 Aug 2012 22:25:09 +0100 Subject: [PATCH] Fix 'No newline...' annotation in rewrite diffs. When operating in --break-rewrites (-B) mode on a file with no newline terminator (an