gitk: Fix bug causing undefined variable error when cherry-picking
When "Show nearby tags" is turned off and the user did a cherry-pick, we were trying to access variables relating to the descendent/ancestor tag & head computations in addnewchild though they hadn't been set. This makes sure we don't do that. Reported by Johannes Sixt. Signed-off-by: Paul Mackerras <paulus@samba.org>
Paul Mackerras committed
Aug 29, 2007 at 22:41 UTC
719c2b9d926bf2be4879015e3620d27d32f007b6
1 file changed
+2
-1
gitk
+2
-1
@@ -6641,8 +6641,9 @@ proc splitarc {p} {
6641
proc addnewchild {id p} {
6642
global allids allparents allchildren idtags nextarc nbmp
6643
global arcnos arcids arctags arcout arcend arcstart archeads growing
6644
- global seeds
6644
+ global seeds allcommits
6645
6646
+ if {![info exists allcommits]} return
6647
lappend allids $id
6648
set allparents($id) [list $p]
6649
set allchildren($id) {}