From: Junio C Hamano Date: Mon, 23 Mar 2009 00:39:47 GMT Subject: Re: [PATCH] Respect core.autocrlf when preparing temporary files for external diff Message-ID: <7vljqx9ing.fsf@gitster.siamese.dyndns.org> In-Reply-To: <20090322074643.GA4826@coredump.intra.peff.net> Jeff King writes: > On Sun, Mar 22, 2009 at 12:18:33AM -0700, Junio C Hamano wrote: > >> Ok. Although I already queued the removal to 'pu' for tonight's pushout >> and it is way too late to revert that, I think I didn't have to remove the >> function. The codepath that lets you cheat by borrowing from the checkout >> runs convert_to_git() when it borrows, and if you are seeing a meaningful >> optimization even with that overhead, perhaps it would be worth keeping. > > I certainly haven't done exhaustive tests. Obviously the one I did was a > bit contrived. I just think it makes sense to have numbers rather than > saying "this probably doesn't do anything anymore". > >> While the purist in me says #1 above is the right argument to make for >> feeding "clean" version, I suspect that the textconv or extdiff tools more >> often are not made from scratch and ported across platforms than are >> cobbled up together out of tools the script writer finds on his platform. >> I suspect that Dscho's "a tempfile should look like a checkout" would be >> much friendlier to them in practice for this reason. > > I think you and I have about the same feeling on this, then. As somebody > who does not actually use smudge/clean filters at all, I am willing to > defer to Dscho's opinion, which is based on practical experience. Thanks for a sanity check. I've split these as two unrelated issues, and have queued (1) Dscho's patch, that always feeds smudged representation to the external diff and textconv filter; (2) A change to reuse_worktree_file() that says "don't reuse" for paths with CE_VALID set. in 'pu'.