summaryrefslogtreecommitdiff
path: root/git-gui.sh
diff options
context:
space:
mode:
authorShawn O. Pearce <spearce@spearce.org>2007-10-02 16:27:32 (GMT)
committerShawn O. Pearce <spearce@spearce.org>2007-10-03 04:16:04 (GMT)
commit906ab7f6c03764423adef6c0e4d77442405adc23 (patch)
treea8edc94d933b81025462bafece5176f447485acf /git-gui.sh
parent501e4c6f23378aca2ce14ba4bc3eebeccb92e8d7 (diff)
downloadgit-906ab7f6c03764423adef6c0e4d77442405adc23.zip
git-906ab7f6c03764423adef6c0e4d77442405adc23.tar.gz
git-906ab7f6c03764423adef6c0e4d77442405adc23.tar.bz2
git-gui: Don't crash when starting gitk from a browser session
If the user has started git-gui from the command line as a browser we offer the gitk menu options but we didn't create the main status bar widget in the "." toplevel. Trying to access it while starting gitk just results in Tcl errors. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Diffstat (limited to 'git-gui.sh')
-rwxr-xr-xgit-gui.sh10
1 files changed, 8 insertions, 2 deletions
diff --git a/git-gui.sh b/git-gui.sh
index 9682418..cf88a0d 100755
--- a/git-gui.sh
+++ b/git-gui.sh
@@ -1125,11 +1125,17 @@ proc mapdesc {state path} {
}
proc ui_status {msg} {
- $::main_status show $msg
+ global main_status
+ if {[info exists main_status]} {
+ $main_status show $msg
+ }
}
proc ui_ready {{test {}}} {
- $::main_status show {Ready.} $test
+ global main_status
+ if {[info exists main_status]} {
+ $main_status show [mc "Ready."] $test
+ }
}
proc escape_path {path} {