gitk: Avoid an error when cherry-picking if HEAD has moved on
This fixes an error reported by Adam Piątyszek: if the current HEAD is not in the graph that gitk knows about when we do a cherry-pick using gitk, then gitk hits an error when trying to update its internal representation of the topology. This avoids the error by not doing that update if the HEAD before the cherry-pick was a commit that gitk doesn't know about. Signed-off-by: Paul Mackerras <paulus@samba.org>
Paul Mackerras committed
Oct 20, 2007 at 22:10 UTC
3ebba3c724f77d149061c62f4414166649c2e56e
1 file changed
+1
-1
gitk
+1
-1
@@ -6648,7 +6648,7 @@ proc addnewchild {id p} {
6648
global arcnos arcids arctags arcout arcend arcstart archeads growing
6649
global seeds allcommits
6650
6651
- if {![info exists allcommits]} return
6651
+ if {![info exists allcommits] || ![info exists arcnos($p)]} return
6652
lappend allids $id
6653
set allparents($id) [list $p]
6654
set allchildren($id) {}