From: Shawn O. Pearce Date: Sat, 20 Oct 2007 05:42:01 +0000 (-0400) Subject: git-gui: Correctly report failures from git-write-tree X-Git-Tag: gitgui-0.8.4~2 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=8af52d7a83a78c5f3a60d5bd5099a5073655339a;p=git.git git-gui: Correctly report failures from git-write-tree If git-write-tree fails (such as if the index file is currently locked and it wants to write to it) we were not getting the error message as $tree_id was always the empty string so we shortcut through the catch and never got the output from stderr. Signed-off-by: Shawn O. Pearce --- diff --git a/lib/commit.tcl b/lib/commit.tcl index f857a2ff5..57238129e 100644 --- a/lib/commit.tcl +++ b/lib/commit.tcl @@ -253,7 +253,7 @@ proc commit_committree {fd_wt curHEAD msg} { global repo_config gets $fd_wt tree_id - if {$tree_id eq {} || [catch {close $fd_wt} err]} { + if {[catch {close $fd_wt} err]} { error_popup "write-tree failed:\n\n$err" ui_status {Commit failed.} unlock_index