Re: Best way to apply textconv to a working tree file

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 1 Jun 2010 13:04:27 -0400, Jeff King <peff@xxxxxxxx> wrote:
> 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

It seems to really fit for git gui. 
About the cache : this method will be only used by git gui (when it's
launched) on working tree files, so it seems OK for me.
Thank you

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]