summaryrefslogtreecommitdiff
path: root/git-gui.sh
diff options
context:
space:
mode:
authorShawn O. Pearce <spearce@spearce.org>2007-07-19 04:43:16 (GMT)
committerShawn O. Pearce <spearce@spearce.org>2007-07-19 04:43:16 (GMT)
commitd36cd968378cd3e509434b1b9f43f1417fdba57e (patch)
treeba77a3cc080d2d1df4fb0ed6494a58da8b0b014f /git-gui.sh
parenta870ddc0997881d5e73c0ec4562f3521274c5960 (diff)
downloadgit-d36cd968378cd3e509434b1b9f43f1417fdba57e.zip
git-d36cd968378cd3e509434b1b9f43f1417fdba57e.tar.gz
git-d36cd968378cd3e509434b1b9f43f1417fdba57e.tar.bz2
git-gui: Avoid unnecessary global statements when possible
Running global takes slightly longer than just accessing the variable via its package name, especially if the variable is just only once in the procedure, or isn't even used at all in the procedure. So this is a minor cleanup for some of our commonly invoked procedures. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Diffstat (limited to 'git-gui.sh')
-rwxr-xr-xgit-gui.sh11
1 files changed, 4 insertions, 7 deletions
diff --git a/git-gui.sh b/git-gui.sh
index 0aabfba..c5ff7c8 100755
--- a/git-gui.sh
+++ b/git-gui.sh
@@ -154,12 +154,10 @@ proc gitexec {args} {
}
proc reponame {} {
- global _reponame
- return $_reponame
+ return $::_reponame
}
proc is_MacOSX {} {
- global tcl_platform tk_library
if {[tk windowingsystem] eq {aqua}} {
return 1
}
@@ -167,17 +165,16 @@ proc is_MacOSX {} {
}
proc is_Windows {} {
- global tcl_platform
- if {$tcl_platform(platform) eq {windows}} {
+ if {$::tcl_platform(platform) eq {windows}} {
return 1
}
return 0
}
proc is_Cygwin {} {
- global tcl_platform _iscygwin
+ global _iscygwin
if {$_iscygwin eq {}} {
- if {$tcl_platform(platform) eq {windows}} {
+ if {$::tcl_platform(platform) eq {windows}} {
if {[catch {set p [exec cygpath --windir]} err]} {
set _iscygwin 0
} else {