Code

gitk: Fix bug where editing an existing view would cause an infinite loop
authorPaul Mackerras <paulus@samba.org>
Tue, 15 Jan 2008 11:30:40 +0000 (22:30 +1100)
committerPaul Mackerras <paulus@samba.org>
Tue, 15 Jan 2008 11:30:40 +0000 (22:30 +1100)
This fixes a bug where changing the commit range or file list for an
existing view and then clicking OK would cause gitk to go into an
infinite loop.  The problem was that newviewok was invoking reloadcommits
via "run reloadcommits", but reloadcommits wasn't explicitly returning
0, and whatever it was returning was causing dorunq to run it over
and over again.  This fixes it by making reloadcommits return 0.

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

diff --git a/gitk b/gitk
index c707c3c1048bfe286a49846b5dcb6835dfacbc55..322ac93f86f8520310e2477ffc18f67047bf1221 100755 (executable)
--- a/gitk
+++ b/gitk
@@ -263,6 +263,7 @@ proc reloadcommits {} {
     catch {unset targetid}
     setcanvscroll
     getcommits
+    return 0
 }
 
 # This makes a string representation of a positive integer which