From: Jens Lehmann Date: Tue, 27 Oct 2009 17:13:42 +0000 (+0100) Subject: gitk: Fix diffing committed -> staged (typo in diffcmd) X-Git-Url: https://privyetmir.co.uk/gitweb.cgi?a=commitdiff_plain;h=90a77925417646041ac408e591f969d7477be0a9;p=gitk gitk: Fix diffing committed -> staged (typo in diffcmd) When highlighting a commit, using the context menu over the staged changes and then selecting "Diff this -> selected" the diff was empty. The same happened when highlighting the staged changes and using "Diff selected -> this" over a commit. The reason was a copy/paste error in [diffcmd]. This fixes it. Signed-off-by: Jens Lehmann Signed-off-by: Paul Mackerras --- diff --git a/gitk b/gitk index d40a735..785afd2 100755 --- a/gitk +++ b/gitk @@ -7225,7 +7225,7 @@ proc diffcmd {ids flags} { set cmd [concat | git diff-index --cached $flags] if {[llength $ids] > 1} { # comparing index with specific revision - if {$i == 0} { + if {$j == 0} { lappend cmd -R [lindex $ids 1] } else { lappend cmd [lindex $ids 0]