git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 2/2] diff: respect textconv in rewrite diffs

From
Junio C Hamano <gitster@pobox.com>
Date
Dec 10, 2008, 08:34 UTC
Message-ID
<7v3agw2zu5.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<20081209081321.GA19707@coredump.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 8 quoted lines
> Currently we just skip rewrite diffs for binary files; this patch makes
> an exception for files which will be textconv'd, and actually performs
> the textconv before generating the diff.
>
> Conceptually, rewrite diffs should be in the exact same format as the a
> non-rewrite diff, except that we refuse to share any context. Thus it
> makes very little sense for "git diff" to show a textconv'd diff, but
> for "git diff -B" to show "Binary files differ".
Makes sense.
> +cat >dump <<'EOF'
> +#!/bin/sh
> +perl -e '$/ = undef; $_ = <>; s/./ord($&)/ge; print $_' < "$1"
> +EOF

I'll squash in a change to make this part use $SHELL_PATH for consistency. Thanks.

Previous: Jeff KingNext: Jeff King
Message 3 of 7 in “diff: fix handling of binary rewrite diffs”
  1. 1/2 diff: fix handling of binary rewrite diffsJeff King, Dec 9, 2008
  2. 2/2 diff: respect textconv in rewrite diffsJeff King, Dec 9, 2008
  3. Junio C HamanoDec 10, 2008
  4. Jeff KingDec 10, 2008
  5. Junio C HamanoDec 10, 2008
  6. Junio C HamanoDec 10, 2008
  7. Jeff KingDec 10, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.