Anonymous avatar Anonymous committed 2d71bcc

gitk: Re-read the descendent/ancestor tag & head info on update

Signed-off-by: Paul Mackerras <paulus@samba.org>;

Comments (0)

Files changed (1)

     catch {unset selectedline}
     catch {unset thickerline}
     catch {unset viewdata($n)}
+    discardallcommits
     readrefs
     showview $n
 }
 
 # Stuff for finding nearby tags
 proc getallcommits {} {
-    global allcstart allcommits
+    global allcstart allcommits allcfd
 
     set fd [open [concat | git rev-list --all --topo-order --parents] r]
+    set allcfd $fd
     fconfigure $fd -blocking 0
     set allcommits "reading"
     nowbusy allcommits
     restartgetall $fd
 }
 
+proc discardallcommits {} {
+    global allparents allchildren allcommits allcfd
+    global desc_tags anc_tags alldtags tagisdesc allids desc_heads
+
+    if {![info exists allcommits]} return
+    if {$allcommits eq "reading"} {
+	catch {close $allcfd}
+    }
+    foreach v {allcommits allchildren allparents allids desc_tags anc_tags
+		alldtags tagisdesc desc_heads} {
+	catch {unset $v}
+    }
+}
+
 proc restartgetall {fd} {
     global allcstart
 
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.