Code

gitk: Use --textconv to generate diff text
authorJohannes Sixt <j6t@kdbg.org>
Tue, 28 Apr 2009 12:03:54 +0000 (14:03 +0200)
committerPaul Mackerras <paulus@samba.org>
Sat, 16 May 2009 11:08:05 +0000 (21:08 +1000)
For the most part gitk's focus is on showing history and changes in
a human readable form.  For this reason, it makes sense to generate
the patch text in the diff view using --textconv so that textconv
drivers are used if they are defined.

gitk can also generate patches, but we do not use --textconv because
such patches could not be applied.

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
gitk

diff --git a/gitk b/gitk
index 1a7887b2528140d63b84a72843c0d0ef64f56538..dcbfdc65389f02f63848df8bb55c9b52ba6f41b6 100755 (executable)
--- a/gitk
+++ b/gitk
@@ -7268,7 +7268,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 --textconv -C --cc --no-commit-id -U$diffcontext"]
     if {$ignorespace} {
        append cmd " -w"
     }