git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Best way to apply textconv to a working tree file

From
CPClément Poulain <clement.poulain@ensimag.imag.fr>
Date
Jun 1, 2010, 13:41 UTC
Message-ID
<a1ace6b77167a2ad4b4995e8c4d09761@ensimag.fr>
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

Next: Matthieu Moy
Message 1 of 8 in “Best way to apply textconv to a working tree file”
  1. Clément PoulainJun 1, 2010
  2. Matthieu MoyJun 1, 2010
  3. Jeff KingJun 1, 2010
  4. Matthieu MoyJun 1, 2010
  5. Jeff KingJun 1, 2010
  6. Clément PoulainJun 2, 2010
  7. Jeff KingJun 1, 2010
  8. Clément PoulainJun 2, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.