Skip to content

Commit

Permalink
git-gui: Correctly report failures from git-write-tree
Browse files Browse the repository at this point in the history
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 <spearce@spearce.org>
  • Loading branch information
Shawn O. Pearce committed Oct 20, 2007
1 parent 96f1195 commit 8af52d7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/commit.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 8af52d7

Please sign in to comment.