Thread (3 messages) flat view 3 messages, 2 authors, 2016-06-15

Best way to apply textconv to a working tree file

From: Clément Poulain <hidden>
Date: 2016-06-15 22:48:53

Hello,

In order to add textconv support to "git-gui blame", we have to run
textconv on a file which is in the working tree.
Currently, "git-gui blame" uses the Tcl function 'open' to display the
content of the working-tree file. This doesn't allow us to run textconv on
it.

We are wondering what is the best way to do the textconv. Here are some
solutions we thought about:

- For revisions, "git-gui blame" is based on "git cat-file blob
<sha1:path>". Therefore, we thought of adding a "--textconv" option on
cat-file as well as a "--working-tree" option ("git cat-file --working-tree
<file>" will display the content of <file> in the working-tree)

- Use the "-p" (pretty print) cat-file's option, with a path beginning by
./ (to avoid ambiguous name like HEAD)

- Create a "git textconv" command, to easily run textconv on any object.

Which way you think is the best?

Thanks for your time and comments.
Regards
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help