git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Johannes Schindelin <johannes.schindelin@gmx.de>
Cc: git@vger.kernel.org, Sebastian Schuberth <sschuberth@gmail.com>
Subject: Re: [PATCH] Respect core.autocrlf when preparing temporary files for external diff
Date: Sat, 21 Mar 2009 12:35:36 -0700	[thread overview]
Message-ID: <7vocvuekjb.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: <8cb424b16f21164ddc26d0be3f6f7727254b3506.1237635609u.git.johannes.schindelin@gmx.de> (Johannes Schindelin's message of "Sat, 21 Mar 2009 12:42:52 +0100 (CET)")

Johannes Schindelin <johannes.schindelin@gmx.de> 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 <clean >smudged
	git filter --take-attr-for-path=$path --direction=in >clean ><mudged

to invoke convert_to_working_tree() and convert_to_git() filters would be
sufficient.

  parent reply	other threads:[~2009-03-21 19:37 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <cover.1237635609u.git.johannes.schindelin@gmx.de>
2009-03-21 11:42 ` [PATCH] Respect core.autocrlf when preparing temporary files for external diff Johannes Schindelin
2009-03-21 17:02   ` Michael J Gruber
2009-03-21 19:35   ` Junio C Hamano [this message]
2009-03-21 23:54     ` Johannes Schindelin
2009-03-22  0:03       ` Junio C Hamano
2009-03-22  0:41         ` Junio C Hamano
2009-03-22  6:10           ` Jeff King
2009-03-22  7:18             ` Junio C Hamano
2009-03-22  7:46               ` Jeff King
2009-03-22 15:30                 ` Sebastian Schuberth
2009-03-22 21:59                   ` Junio C Hamano
2009-03-22 22:48                     ` Sebastian Schuberth
2009-03-22 23:12                       ` Junio C Hamano
2009-03-23  0:39                 ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7vocvuekjb.fsf@gitster.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=johannes.schindelin@gmx.de \
    --cc=sschuberth@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).