[PATCH] gitk: Fix for tree view ending in nested directories

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Unroll the prefix stack when assigning treeheights when leaving
proc treeview.  Previously, when the ls-tree output ended in
multiple nested directories (for instance in a repository with a
single file "foo/bar/baz"), $treeheight("foo/bar/") was assigned
twice, and $treeheight("foo/") was never assigned.  This led to
an error when expanding the "foo" directory in the gitk treeview.

Signed-off-by: Brian Downing <bdowning@xxxxxxxxx>
---
 gitk |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/gitk b/gitk
index 2d6a6ef..d94c512 100755
--- a/gitk
+++ b/gitk
@@ -1216,6 +1216,9 @@ proc treeview {w l openlevs} {
 	set treeheight($prefix) $ht
 	incr ht [lindex $htstack end]
 	set htstack [lreplace $htstack end end]
+	set prefixend [lindex $prefendstack end]
+	set prefendstack [lreplace $prefendstack end end]
+	set prefix [string range $prefix 0 $prefixend]
     }
     $w conf -state disabled
 }
-- 
1.5.2.GIT
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux