Michael J Gruber [off-list ref] writes:
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.
Sorry, that doesn't change a thing at all. The presense of incomplete
line is part of the information diff gives you.
It can be done by defining a custom textconv filter that adds a trailing
LF to a blob that ends in an incomplete line, and what your patch 3/4 does
is essentially to create such a built-in textconv filter and *force* users
to use it unconditionally for all paths unless the user explicitly asks
not to use *any* textconv.
Junio C Hamano venit, vidit, dixit 05.06.2010 08:38:
Michael J Gruber [off-list ref] writes:
quoted
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.
Sorry, that doesn't change a thing at all. The presense of incomplete
line is part of the information diff gives you.
It can be done by defining a custom textconv filter that adds a trailing
LF to a blob that ends in an incomplete line, and what your patch 3/4 does
is essentially to create such a built-in textconv filter and *force* users
to use it unconditionally for all paths unless the user explicitly asks
not to use *any* textconv.
No, not for all paths, only for symlinks. And, as not only I have
pointed out, diffs with textconv (which is the default) may produce
"incomplete" diffs anyways. The only difference is that people would
have to set up textconv filters before.
That is why there seems to be consensus in statu nascendi (on that other
branch of the thread) that we should protect against textconv in the
same way as we do for color, i.e. based on whether stdout = tty. Then my
symlink treatment would be conditional in the same way as it is
conditional on textconv.
Michael
On Fri, Jun 04, 2010 at 11:38:39PM -0700, Junio C Hamano wrote:
It can be done by defining a custom textconv filter that adds a trailing
LF to a blob that ends in an incomplete line, and what your patch 3/4 does
is essentially to create such a built-in textconv filter and *force* users
to use it unconditionally for all paths unless the user explicitly asks
not to use *any* textconv.
Side note: it would be kind of cool to have .gitattributes selectable on
file mode, so you could implement this feature entirely as a textconv on
symlinks. And then you could pretty-print them however you liked.
That may be going overboard, though.
-Peff