aboutsummaryrefslogtreecommitdiff
path: root/gitk
diff options
context:
space:
mode:
authorPaul Mackerras <paulus@samba.org>2007-08-13 15:02:02 +1000
committerPaul Mackerras <paulus@samba.org>2007-08-13 15:02:02 +1000
commita69b2d1a8bf335ddbf0929c609b2daa523c7ede0 (patch)
tree02066b640e0320d23f6adc899eb22cbe0a3f8157 /gitk
parent7b459a1c1cc5401295e3adb12031e39e35712f4a (diff)
downloadgit-a69b2d1a8bf335ddbf0929c609b2daa523c7ede0.tar.gz
git-a69b2d1a8bf335ddbf0929c609b2daa523c7ede0.tar.xz
gitk: Fix bug causing Tcl error when updating graph
If "Show nearby tags" is turned off, selecting "Update" from the File menu will cause a Tcl error. This fixes it. The problem was that we were calling regetallcommits unconditionally, but it assumed that getallcommits had been called previously. This also restructures {re,}getallcommits to be a bit simpler. Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'gitk')
-rwxr-xr-xgitk24
1 files changed, 11 insertions, 13 deletions
diff --git a/gitk b/gitk
index 666a54575..57617d58b 100755
--- a/gitk
+++ b/gitk
@@ -296,7 +296,7 @@ proc readcommit {id} {
proc updatecommits {} {
global viewdata curview phase displayorder
- global children commitrow selectedline thickerline
+ global children commitrow selectedline thickerline showneartags
if {$phase ne {}} {
stop_rev_list
@@ -313,7 +313,9 @@ proc updatecommits {} {
catch {unset viewdata($n)}
readrefs
changedrefs
- regetallcommits
+ if {$showneartags} {
+ getallcommits
+ }
showview $n
}
@@ -6199,17 +6201,13 @@ proc rmbranch {} {
proc getallcommits {} {
global allcommits allids nbmp nextarc seeds
- set allids {}
- set nbmp 0
- set nextarc 0
- set allcommits 0
- set seeds {}
- regetallcommits
-}
-
-# Called when the graph might have changed
-proc regetallcommits {} {
- global allcommits seeds
+ if {![info exists allcommits]} {
+ set allids {}
+ set nbmp 0
+ set nextarc 0
+ set allcommits 0
+ set seeds {}
+ }
set cmd [concat | git rev-list --all --parents]
foreach id $seeds {