gitk: Fixed broken exception handling in diff

If the tree diff command failed to start for some
random reason, treepending remained set, and thus
no more diffs were shown after that.

Signed-off-by: Alexander Gavrilov <angavrilov@gmail.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
maint
Alexander Gavrilov 2008-07-26 18:48:41 +04:00 committed by Paul Mackerras
parent b6326e92ef
commit 7272131b3e
1 changed files with 2 additions and 1 deletions

3
gitk
View File

@ -6457,9 +6457,10 @@ proc diffcmd {ids flags} {
proc gettreediffs {ids} {
global treediff treepending

if {[catch {set gdtf [open [diffcmd $ids {--no-commit-id}] r]}]} return

set treepending $ids
set treediff {}
if {[catch {set gdtf [open [diffcmd $ids {--no-commit-id}] r]}]} return
fconfigure $gdtf -blocking 0
filerun $gdtf [list gettreediffline $gdtf $ids]
}