summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: da5239d)
raw | patch | inline | side by side (parent: da5239d)
author | Shawn O. Pearce <spearce@spearce.org> | |
Sun, 12 Nov 2006 00:10:10 +0000 (19:10 -0500) | ||
committer | Shawn O. Pearce <spearce@spearce.org> | |
Sun, 12 Nov 2006 05:16:02 +0000 (00:16 -0500) |
Added an extra blank line between the first line of each error message
and the rest of the message, as usually the rest of the message is
coming from Tcl or is the stderr output of a git command we tried to
invoke. This makes it easier to read the output (if any).
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
and the rest of the message, as usually the rest of the message is
coming from Tcl or is the stderr output of a git command we tried to
invoke. This makes it easier to read the output (if any).
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
git-gui | patch | blob | history |
index 81fe38f0068335f2f3dba8abae905eb3cdd8db84..4449c7d67e092d2dbed82a21bfdc86f2b6dad2c4 100755 (executable)
--- a/git-gui
+++ b/git-gui
end]
append title {)}
}
- tk_messageBox -parent . \
+ tk_messageBox \
+ -parent . \
-icon error \
-type ok \
-title "$title: error" \
##
## repository setup
-if {[catch {set cdup [exec git rev-parse --show-cdup]} err]} {
- error_popup "Cannot find the git directory:\n$err"
+if { [catch {set cdup [exec git rev-parse --show-cdup]} err]
+ || [catch {set gitdir [exec git rev-parse --git-dir]} err]} {
+ catch {wm withdraw .}
+ error_popup "Cannot find the git directory:\n\n$err"
exit 1
}
if {$cdup != ""} {
}
unset cdup
-if {[catch {set gitdir [exec git rev-parse --git-dir]} err]} {
- error_popup "Cannot find the git directory:\n$err"
- exit 1
-}
-
if {$appname == {git-citool}} {
set single_commit 1
}
set diff_active 0
unlock_index
set ui_status_value "Unable to display [escape_path $path]"
- error_popup "Error loading file:\n$err"
+ error_popup "Error loading file:\n\n$err"
return
}
$ui_diff conf -state normal
set diff_active 0
unlock_index
set ui_status_value "Unable to display [escape_path $path]"
- error_popup "Error loading diff:\n$err"
+ error_popup "Error loading diff:\n\n$err"
return
}
set msg [string trim [read $fd]]
close $fd
} err]} {
- error_popup "Error loading commit data for amend:\n$err"
+ error_popup "Error loading commit data for amend:\n\n$err"
return
}
global file_states
gets $fd_wt tree_id
- close $fd_wt
-
- if {$tree_id == {}} {
- error_popup "write-tree failed"
+ if {$tree_id == {} || [catch {close $fd_wt} err]} {
+ error_popup "write-tree failed:\n\n$err"
set commit_active 0
set ui_status_value {Commit failed.}
unlock_index
}
close $fd_mh
} err]} {
- error_popup "Loading MERGE_HEAD failed:\n$err"
+ error_popup "Loading MERGE_HEAD failed:\n\n$err"
set commit_active 0
set ui_status_value {Commit failed.}
unlock_index
}
lappend cmd << $msg
if {[catch {set cmt_id [eval exec $cmd]} err]} {
- error_popup "commit-tree failed:\n$err"
+ error_popup "commit-tree failed:\n\n$err"
set commit_active 0
set ui_status_value {Commit failed.}
unlock_index
}
set cmd [list git update-ref -m $reflogm HEAD $cmt_id $curHEAD]
if {[catch {eval exec $cmd} err]} {
- error_popup "update-ref failed:\n$err"
+ error_popup "update-ref failed:\n\n$err"
set commit_active 0
set ui_status_value {Commit failed.}
unlock_index
if {$GIT_COMMITTER_IDENT == {}} {
if {[catch {set me [exec git var GIT_COMMITTER_IDENT]} err]} {
- error_popup "Unable to obtain your identity:\n$err"
+ error_popup "Unable to obtain your identity:\n\n$err"
return
}
if {![regexp {^(.*) [0-9]+ [-+0-9]+$} \
$me me GIT_COMMITTER_IDENT]} {
- error_popup "Invalid GIT_COMMITTER_IDENT:\n$me"
+ error_popup "Invalid GIT_COMMITTER_IDENT:\n\n$me"
return
}
}