Thread (1 message) 1 message, 1 author, 2016-06-15

Re: [PATCH] Respect core.autocrlf when preparing temporary files for external diff

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:46:26

Johannes Schindelin [off-list ref] writes:
On Sat, 21 Mar 2009, Junio C Hamano wrote:
quoted
Johannes Schindelin [off-list ref] writes:
quoted
When preparing temporary files for an external diff, the files should 
be handled as if they were worktree files.
I do not think so.  convert_to_working_tree() aka "smudge" means you 
would be feeding crap like $Id$ expansion to the external diff, which we 
chose not to do quite on purpose.
You might have missed me mentioning that we often can do without temporary 
files, taking the working directory copies right away?

And if you think about it, it makes complete sense.
Not "complete".

What is at issue is how consistent the codepath that calls out to an
external diff should be with the rest of git that solely work with the
"clean" version of blob contents.  If you value consistency, I would say
that it is valid to argue that letting it borrow from a work tree is a
bug.  It should be always feeding a clean version.

But if you think that we do not care really about the correctness of the
external diff codepath, because it is a mechanism used mostly for giving
output to humans (as opposed to feeding the output of the external diff
program back to programs to be processed further) , I can understand why
you think it is easier to the external programs if "smudged" version is
fed to them.

Not just I can _understand_, but I think I could be pursuaded to agree
with that position, iff you try harder.

But the assumption/rationale behind this change needs to be spelled out.
In essence, we are sacrificing purity and correctness because we consider
ease of building external diff filter is more important.

Or something like that.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help