Skip to contentSkip to conversation

gitk: fix typo when diffing committed -> staged

PATCH Applied Jens Lehmann 2 participants 2 messages Jun 15, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 gitk: fix typo when diffing committed -> staged

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.

---

I became aware of this issue while testing the submodule patch sent earlier. Looks just like a copy & paste typo.

 gitk-git/gitk |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
gitk-git/gitk +1 -1
index a0214b7..8e892b3 100644
@@ -7224,7 +7224,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]
Signature · 1 line
1.6.5.2.181.gd6f41.dirty
#1 lore raw
Quoted 6 lines · Jens Lehmann

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.

Thanks, applied.

Paul.