git-gui: open console when using --trace on windows
authorHeiko Voigt <hvoigt@hvoigt.net>
Fri, 23 Mar 2012 17:46:27 +0000 (18:46 +0100)
committerPat Thoyts <patthoyts@users.sourceforge.net>
Sun, 25 Mar 2012 12:24:14 +0000 (13:24 +0100)
When starting a gui program on windows stdout, stderr and stdin are not
connected to the cmd console. As a workaround tk has a console window.
Lets open this when the --trace commandline option has been given.
This is helpful for debugging.

Signed-off-by: Heiko Voigt <hvoigt@hvoigt.net>
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
git-gui.sh
index ba4e5c1330c84f54a6809991eec22aa2e8e25ddd..7dddc7dd24f85a7094e725f759a264b8154fba73 100755 (executable)
@@ -154,6 +154,7 @@ set _trace [lsearch -exact $argv --trace]
 if {$_trace >= 0} {
        set argv [lreplace $argv $_trace $_trace]
        set _trace 1
+       if {[tk windowingsystem] eq "win32"} { console show }
 } else {
        set _trace 0
 }