summaryrefslogtreecommitdiff
path: root/git-gui/git-gui.sh
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2010-09-15 19:34:37 (GMT)
committerJunio C Hamano <gitster@pobox.com>2010-09-15 19:34:48 (GMT)
commit12644fa99fd16c33379c885670be0963cec07fc1 (patch)
treedcc24e83797accfe0f781011af4c318f7c855743 /git-gui/git-gui.sh
parent5879b6bbcaba7696e4abfa717748da166f915405 (diff)
parent00e9de72c8f9b7c048bb56a59be9567d69dc1e01 (diff)
downloadgit-12644fa99fd16c33379c885670be0963cec07fc1.zip
git-12644fa99fd16c33379c885670be0963cec07fc1.tar.gz
git-12644fa99fd16c33379c885670be0963cec07fc1.tar.bz2
Merge git://repo.or.cz/git-gui
* 'master' of git://repo.or.cz/git-gui: git-gui 0.13 git-gui: avoid mis-encoding the copyright message on Windows. git-gui: Update Swedish translation (521t). git-gui: ensure correct application termination in git-gui--askpass git-gui: handle textconv filter on Windows and in development git-gui: use shell to launch textconv filter in "blame" git-gui: display error launching blame as a message box. git-gui: Make usage statement visible on Windows.
Diffstat (limited to 'git-gui/git-gui.sh')
-rwxr-xr-xgit-gui/git-gui.sh32
1 files changed, 28 insertions, 4 deletions
diff --git a/git-gui/git-gui.sh b/git-gui/git-gui.sh
index bb10489..4617f29 100755
--- a/git-gui/git-gui.sh
+++ b/git-gui/git-gui.sh
@@ -10,8 +10,8 @@
exec wish "$argv0" -- "$@"
set appvers {@@GITGUI_VERSION@@}
-set copyright [encoding convertfrom utf-8 {
-Copyright © 2006, 2007 Shawn Pearce, et. al.
+set copyright [string map [list (c) \u00a9] {
+Copyright (c) 2006-2010 Shawn Pearce, et. al.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -128,6 +128,7 @@ set _githtmldir {}
set _reponame {}
set _iscygwin {}
set _search_path {}
+set _shellpath {@@SHELL_PATH@@}
set _trace [lsearch -exact $argv --trace]
if {$_trace >= 0} {
@@ -137,6 +138,18 @@ if {$_trace >= 0} {
set _trace 0
}
+proc shellpath {} {
+ global _shellpath env
+ if {[string match @@* $_shellpath]} {
+ if {[info exists env(SHELL)]} {
+ return $env(SHELL)
+ } else {
+ return /bin/sh
+ }
+ }
+ return $_shellpath
+}
+
proc appname {} {
global _appname
return $_appname
@@ -2845,7 +2858,13 @@ bind all <$M1B-Key-W> {destroy [winfo toplevel %W]}
set subcommand_args {}
proc usage {} {
- puts stderr "usage: $::argv0 $::subcommand $::subcommand_args"
+ set s "usage: $::argv0 $::subcommand $::subcommand_args"
+ if {[tk windowingsystem] eq "win32"} {
+ wm withdraw .
+ tk_messageBox -icon info -title "Usage" -message $s
+ } else {
+ puts stderr $s
+ }
exit 1
}
@@ -2938,7 +2957,12 @@ blame {
}
blame {
if {$head eq {} && ![file exists $path]} {
- puts stderr [mc "fatal: cannot stat path %s: No such file or directory" $path]
+ catch {wm withdraw .}
+ tk_messageBox \
+ -icon error \
+ -type ok \
+ -title [mc "git-gui: fatal error"] \
+ -message [mc "fatal: cannot stat path %s: No such file or directory" $path]
exit 1
}
blame::new $head $path $jump_spec