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

[gitk PATCH 3/3] gitk: allow text-conversion in diffs

From
Jeff King <peff@peff.net>
Date
Dec 8, 2008, 03:00 UTC
Message-ID
<20081208030046.GC22072@coredump.intra.peff.net>

The "textconv" feature of git requires explicit enabling in plumbing because the resulting diffs are not useful for feeding to "git-apply" or "patch". Thus any callers should make a conscious choice that they want the human-friendly version.

Since the diffs presented by gitk are meant primarily for human consumption, and not applying, it makes sense to allow text conversion. --- Paul,

I am cc'ing you only on 3/3 since it is the only gitk patch (the others implement --textconv in git itself). Textconv is basically a feature to show human-readable text diffs of binary files by doing a one-way binary to text conversion (and so they can't be applied).

I think gitk would always want to support these; if not, then the alternative is a "diff flags" option for gitk where the user could specify this flag manually.

 gitk |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/gitk b/gitk
index a5e24e4..0fb87c7 100755
--- a/gitk
+++ b/gitk
@@ -7198,7 +7198,7 @@ proc getblobdiffs {ids} {
     global limitdiffs vfilelimit curview
     global diffencoding targetline diffnparents
 
-    set cmd [diffcmd $ids "-p -C --cc --no-commit-id -U$diffcontext"]
+    set cmd [diffcmd $ids "-p -C --cc --no-commit-id -U$diffcontext --textconv"]
     if {$ignorespace} {
 	append cmd " -w"
     }
-- 
1.6.1.rc2.285.gc1cf2
Message 1 of 1 in “gitk: allow text-conversion in diffs”
  1. 3/3 gitk: allow text-conversion in diffsJeff King, Dec 8, 2008

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.