From: Junio C Hamano <gitster@pobox.com>
To: Jeff King <peff@peff.net>
Cc: git@vger.kernel.org
Subject: Re: [PATCH 2/3] diff: allow turning on textconv explicitly for plumbing
Date: Mon, 08 Dec 2008 00:27:25 -0800 [thread overview]
Message-ID: <7v63lv842a.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: <7vskoz88g8.fsf@gitster.siamese.dyndns.org> (Junio C. Hamano's message of "Sun, 07 Dec 2008 22:52:39 -0800")
Junio C Hamano <gitster@pobox.com> writes:
> In any case, I've applied the series for an entirely different reason.
> The patch is the most natural way to allow users of Porcelain to disable
> textconv with the --no-textconv option, just like --no-ext-diff can be
> used to disable the external diff.
I imagine that web developers may want to use a textconv filter that
replaces ">" with "\n>" on the HTML files their designer-colleagues throw
in the source tree to make "git log -p" of the whole project easier to
follow. When the developers would want to suggest improvements to what
their designer-colleagues did, however, by running "git diff --stat -p" in
their dirty work tree to produce a patch (like I just did just now,
visible from the mnemonic prefixes below), they would want to disable
textconv temporarily to get an appliable patch with --no-textconv option.
Once we have --no-textconv, somebody would inevitably ask about its
positive counterpart, --textconv option. Even though it might not make
sense from patch applicability viewpoint, the option would allow the end
user to explicitly ask for "git format-patch --textconv" and get a patch
that can only be reviewed by humans but cannot be applied. Hence the
attached update to the draft release notes to version 1.6.1 [Update #1].
You raised an intriguing possibility to use textconv in blame. It would
also be useful if we allowed "git show --textconv $blob" to pass the blob
via textconv filter and any other transformation controlled by the
attributes mechanism.. When "git show" sees the above command line, it
only knows the blob object name and not the path, so we may need to allow
a new option to tell the command to pretend as if the content came from a
path, perhaps with a syntax like:
$ git show --attribute-path=a/b/c $blob
$ git show --attribute-path=a/b/c --textconv $blob
Note that I envision that the above two commands would produce different
results. The former would behave as if $blob were recorded at path a/b/c
and what would be checked out (i.e. usual crlf, ident, and smudge that are
in effect for the path are applied) to the standard output. The latter
would apply the textconv filter that would apply to what is recorded at
the given path and show that.
[Update #1]
Documentation/RelNotes-1.6.1.txt | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git c/Documentation/RelNotes-1.6.1.txt w/Documentation/RelNotes-1.6.1.txt
index 0405309..09bbcad 100644
--- c/Documentation/RelNotes-1.6.1.txt
+++ w/Documentation/RelNotes-1.6.1.txt
@@ -133,7 +133,8 @@ on.
contents can be munged into human readable form and the difference
between the results of the conversion can be viewed (obviously this
cannot produce a patch that can be applied, so this is disabled in
- format-patch among other things).
+ format-patch and plumbing, but if you really wanted to, you can enable
+ it by giving them --textconv command line option explicitly).
* "--cached" option to "git diff has an easier to remember synonym "--staged",
to ask "what is the difference between the given commit and the
next prev parent reply other threads:[~2008-12-08 8:30 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-12-08 2:57 [PATCH 2/3] diff: allow turning on textconv explicitly for plumbing Jeff King
2008-12-08 3:55 ` Junio C Hamano
2008-12-08 4:08 ` Junio C Hamano
2008-12-08 4:59 ` Jeff King
2008-12-08 6:52 ` Junio C Hamano
2008-12-08 7:14 ` Jeff King
2008-12-08 8:27 ` Junio C Hamano [this message]
2008-12-09 5:48 ` Jeff King
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=7v63lv842a.fsf@gitster.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=peff@peff.net \
/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).