summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShawn O. Pearce <spearce@spearce.org>2007-10-20 05:42:01 (GMT)
committerShawn O. Pearce <spearce@spearce.org>2007-10-20 05:42:01 (GMT)
commit8af52d7a83a78c5f3a60d5bd5099a5073655339a (patch)
treeec1f6468c21b4ddff7a488c4453c82ed0bbdef7b
parent96f11953c0b0b9b0a0c75fb98bdf239dce5ff582 (diff)
downloadgit-8af52d7a83a78c5f3a60d5bd5099a5073655339a.zip
git-8af52d7a83a78c5f3a60d5bd5099a5073655339a.tar.gz
git-8af52d7a83a78c5f3a60d5bd5099a5073655339a.tar.bz2
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 <spearce@spearce.org>
-rw-r--r--lib/commit.tcl2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/commit.tcl b/lib/commit.tcl
index f857a2f..5723812 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