When a file that ends with an incomplete line is expressed as a
complete rewrite with the -B option, git diff incorrectly appends the
incomplete line indicator "\ No newline at end of file" after such a
line, rather than writing it on a line of its own (the output codepath
for normal output without
"previously".
A (POSIXy technical term) for the last line that does not end with
the newline is "incomplete line", I think.
Cf.
http://pubs.opengroup.org/onlinepubs/9699919799/xrat/V4_xbd_chap03.html#tag_21_03_00_67
I'd describe this perhaps like so if I were doing
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
On Fri, Aug 03, 2012 at 09:46:22AM -0700, Junio C Hamano wrote:
> >> Maybe you could introduce "test_seq" instead.
> >
> > I don't have a strong preference, as there are only two callsites. Do
> > you want to make a patch?
>
> If you run "for . in . . ." in t/, we see quite a many hits, so
> "onl
Jeff King writes:
> On Fri, Aug 03, 2012 at 07:49:47AM +, Michał Kiedrowicz wrote:
>
>> Jeff King peff.net> writes:
>>
>> > - for i in $(seq 1 $GIT_PERF_REPEAT_COUNT); do
>> > + for i in $("$PERL_PATH" -le "print for
>> > 1..$GIT_PERF_REPEAT_COUNT"); do
>>
>> Maybe you c
On Fri, Aug 03, 2012 at 07:49:47AM +, Michał Kiedrowicz wrote:
> Jeff King peff.net> writes:
>
> > - for i in $(seq 1 $GIT_PERF_REPEAT_COUNT); do
> > + for i in $("$PERL_PATH" -le "print for
> > 1..$GIT_PERF_REPEAT_COUNT"); do
>
> Maybe you could introduce "test_seq" in
Jeff King peff.net> writes:
> - for i in $(seq 1 $GIT_PERF_REPEAT_COUNT); do
> + for i in $("$PERL_PATH" -le "print for
> 1..$GIT_PERF_REPEAT_COUNT"); do
Maybe you could introduce "test_seq" instead.
--
To unsubscribe from this list: send the line "unsubscribe git" in
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.
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
On Thu, Aug 02, 2012 at 02:52:56PM -0700, Junio C Hamano wrote:
> > Seq is (unfortunately) not portable. I usually use a perl snippet
> > instead, like:
> >
> > perl -le 'print for (1..10)'
> >
> > Though I think we are adjusting that to use $PERL_PATH these days.
>
> t/perf/perf-lib.sh and t/t
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.
> +seq 1 10 > seq
> +seq 100 +1 200 >>
Jeff King writes:
> 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 newl
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 rewrite diffs.
You can
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
14 matches
Mail list logo