From: Junio C Hamano Date: Sat, 21 Mar 2009 19:35:36 GMT Subject: Re: [PATCH] Respect core.autocrlf when preparing temporary files for external diff Message-ID: <7vocvuekjb.fsf@gitster.siamese.dyndns.org> In-Reply-To: <8cb424b16f21164ddc26d0be3f6f7727254b3506.1237635609u.git.johannes.schindelin@gmx.de> Johannes Schindelin writes: > 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. I think the right solution is to filter inside GIT_EXTERNAL_DIFF *if* the diff tool you are dispatching into from the external diff script wants to take smudged representation. I know we don't have such a command right now, but something like git filter --take-attr-for-path=$path --direction=out smudged git filter --take-attr-for-path=$path --direction=in >clean >