[RFC] gitk using diff-tree -M for merges

From: Uwe Kleine-König <hidden>
Date: 2016-06-15 22:43:09
Subsystem: the rest · Maintainer: Linus Torvalds

Hello,

looking at the diff that commit 070739fd351702ea9bb4f65595728ae25a488075
introduced with gitk from 1.5.2-rc3 [1], I'd prefer gitk using the
option -M for diff-tree to detect that in 3f28f63f git-gui.sh exists,
too.  Currently the diff is a bit longer that the whole file, with -M it
would be empty.

Probably using -M hurts performance, so it should better be a config
option?

Below is a patch that hardcodes -M, I didn't check if there are more
places where it should be added.

What do you think?

Best regards
Uwe

[1] the following is a nice view:

	gitk 070739fd351702ea9bb4f65595728ae25a488075 ^53a58245863eff3d70aaa3ac75d7d57e843fc91d^ ^e701ccc3883959b4ba5fada7a903e8e9eaddcba7
diff --git a/gitk b/gitk
index a57e84c..bcc4637 100755
--- a/gitk
+++ b/gitk
@@ -4240,7 +4240,7 @@ proc mergediff {id l} {
     set diffids $id
     # this doesn't seem to actually affect anything...
     set env(GIT_DIFF_OPTS) $diffopts
-    set cmd [concat | git diff-tree --no-commit-id --cc $id]
+    set cmd [concat | git diff-tree -M --no-commit-id --cc $id]
     if {[catch {set mdf [open $cmd r]} err]} {
 	error_popup "Error getting merge diffs: $err"
 	return
-- 
Uwe Kleine-König

http://www.google.com/search?q=1+electron+mass%3D
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help