Skip to content

Commit

Permalink
gitk: Fixed broken exception handling in diff
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Alexander Gavrilov authored and Paul Mackerras committed Jul 31, 2008
1 parent b6326e9 commit 7272131
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion gitk
Original file line number Diff line number Diff line change
Expand Up @@ -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]
}
Expand Down

0 comments on commit 7272131

Please sign in to comment.