From: Jeff King <peff@peff.net>
To: "Clément Poulain" <clement.poulain@ensimag.imag.fr>
Cc: git@vger.kernel.org, diane.gasselin@ensimag.imag.fr,
axel.bonnet@ensimag.imag.fr, matthieu.moy@grenoble-inp.fr
Subject: Re: Best way to apply textconv to a working tree file
Date: Tue, 1 Jun 2010 13:04:27 -0400 [thread overview]
Message-ID: <20100601170426.GC9702@sigill.intra.peff.net> (raw)
In-Reply-To: <a1ace6b77167a2ad4b4995e8c4d09761@ensimag.fr>
On Tue, Jun 01, 2010 at 03:41:05PM +0200, Clément Poulain wrote:
> We are wondering what is the best way to do the textconv. Here are some
> solutions we thought about:
One solution you didn't mention would be to do it all yourself:
driver=`git check-attr diff "$file" | cut -d: -f3`
textconv=`git config diff.$driver.textconv`
$textconv <$file >$file.converted
This has the advantage of working with existing versions of git. The
downside is that it's more code (e.g., my parsing above is quite sloppy
and loose. Doing it right would be a few more lines).
Furthermore, it doesn't use the textconv cache at all. For working tree
files, this might not matter (if you pull the sha1 out of the index,
though, you can still check the cache, and unchanged working tree files
are likely to be in the cache). But for blobs in general, the cache is
worth using.
-Peff
next prev parent reply other threads:[~2010-06-01 17:04 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-01 13:41 Best way to apply textconv to a working tree file Clément Poulain
2010-06-01 16:07 ` Matthieu Moy
2010-06-01 17:14 ` Jeff King
2010-06-01 17:30 ` Matthieu Moy
2010-06-01 19:50 ` Jeff King
2010-06-02 15:12 ` Clément Poulain
2010-06-01 17:04 ` Jeff King [this message]
2010-06-02 9:56 ` Clément Poulain
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=20100601170426.GC9702@sigill.intra.peff.net \
--to=peff@peff.net \
--cc=axel.bonnet@ensimag.imag.fr \
--cc=clement.poulain@ensimag.imag.fr \
--cc=diane.gasselin@ensimag.imag.fr \
--cc=git@vger.kernel.org \
--cc=matthieu.moy@grenoble-inp.fr \
/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).