diff options
author | Shawn O. Pearce <spearce@spearce.org> | 2007-05-28 11:22:13 -0400 |
---|---|---|
committer | Shawn O. Pearce <spearce@spearce.org> | 2007-05-28 17:50:41 -0400 |
commit | cd12901b8f247bfcec161d5de658dae6c8185691 (patch) | |
tree | cea7e560076d7c708eb10288f3b61e8d71cf6ac5 | |
parent | 26ae37d6fc9eeec27a0edf98c820b8a0b98e96f3 (diff) | |
download | git-cd12901b8f247bfcec161d5de658dae6c8185691.tar.gz git-cd12901b8f247bfcec161d5de658dae6c8185691.tar.xz |
git-gui: Enable verbose Tcl loading earlier
When we are using our "non-optimized" tclIndex format (which is
just a list of filenames, in the order necessary for source'ing)
we are doing all of our loading before we even tested to see if
GITGUI_VERBOSE was set in the environment. This meant we never
showed the files as we sourced them into the environment.
Now we setup our overloaded auto_load and source scripts before
we attempt to define our library path, or source the scripts that
it mentions. This way GITGUI_VERBOSE is always honored if set.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
-rwxr-xr-x | git-gui.sh | 32 |
1 files changed, 18 insertions, 14 deletions
diff --git a/git-gui.sh b/git-gui.sh index c1a6b84fa..660811633 100755 --- a/git-gui.sh +++ b/git-gui.sh @@ -22,6 +22,24 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA} ###################################################################### ## +## enable verbose loading? + +if {![catch {set _verbose $env(GITGUI_VERBOSE)}]} { + unset _verbose + rename auto_load real__auto_load + proc auto_load {name args} { + puts stderr "auto_load $name" + return [uplevel 1 real__auto_load $name $args] + } + rename source real__source + proc source {name} { + puts stderr "source $name" + uplevel 1 real__source $name + } +} + +###################################################################### +## ## configure our library set oguilib {@@GITGUI_LIBDIR@@} @@ -61,20 +79,6 @@ if {$idx ne {}} { } unset -nocomplain oguirel idx fd -if {![catch {set _verbose $env(GITGUI_VERBOSE)}]} { - unset _verbose - rename auto_load real__auto_load - proc auto_load {name args} { - puts stderr "auto_load $name" - return [uplevel 1 real__auto_load $name $args] - } - rename source real__source - proc source {name} { - puts stderr "source $name" - uplevel 1 real__source $name - } -} - ###################################################################### ## ## read only globals |