Thread (12 messages) 12 messages, 4 authors, 2016-06-15

Re: [PATCH 1/4] diff/xdiff: refactor EOF-EOL detection

From: Michael J Gruber <hidden>
Date: 2016-06-15 22:48:54

Junio C Hamano venit, vidit, dixit 03.06.2010 23:58:
Michael J Gruber [off-list ref] writes:
quoted
This puts the "No newline at end of file" warning for both code paths
This is not a warning.

It is an integral part of the diff output specification that allows patch
recipients to correctly reproduce incomplete lines.  Removing this from
the output is simply out of question.
I'm sorry, but that makes 3 out of 3 respondents who didn't seem to read
what I wrote.

This series is about the display of that line for human-consumable
output such as log -p etc.

Patch 1/4 doesn't remove anything. It just makes it simpler to follow
the different diff code paths that we have.

In 3/4, that "No NL at EOF" is suppressed for symlinks *when textconv is
in effect only*, i.e. when we don't (necessarily) produce a diff fit to
be applied anyways.

As Jeff pointed out in his 2nd response, it may make sense to have this
dependent on TERM just like color output is currently (which messes ab
diff|apply also!).

I would even go so far to say that --no-textconv should be the default
for diff,log etc. unless the output goes to the terminal, just like our
color handling.

Michael
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help