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

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

 



Jeff King <peff@xxxxxxxx> writes:

>> git cat-file --textconv <blob-sha1>            # Run textconv on blob
>
> This wouldn't work. The textconv is defined by the diff driver, which is
> associated with a pathname,

Right, forget it.

>> git cat-file --textconv <tree-sha1>:<filename> # Run textconv on file
>>                                                # (in object database)
>
> This could work in theory, but will not be as easy to implement as you
> hope.

Actually, Clément has already hit the issue.

> complex as "HEAD@{12:00 yesterday}:foo.c"

_that_ is the actual example I was looking for ;-) (with a : inside
the pathname to make sure you can't search it from the right).

> It would be nice if there was some way in the get_sha1* functions to
> save some context, like tree context and filename. This would be helpful
> for something like "git show HEAD:foo.txt", which probably should be
> respecting autocrlf and smudge/clean filters.

Yup. The code to do the parsing is already there, it "just" needs to
be made available through a clean API.

-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/
--
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]