threads / patch / 16633

patch, 3 partsgitk: allow text-conversion in diffs

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

## tl;dr

One message between Dec 8, 2008 and Dec 8, 2008. Diffs are folded; open one to read it.

replies: 0people: 1as markdown or json

Jeff King· Dec 8, 2008, 03:00 UTC · lore

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(-)
Show changes to gitk +1 −1
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

← back to recent threads