{"thread":{"id":"30041","subject":"[GIT GUI PATCH] git-gui: open console when using --trace on windows","startedAt":"2012-03-23T17:46:27Z","lastAt":"2012-03-23T17:46:27Z","messageCount":1,"participants":["Heiko Voigt"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"187589","messageId":"242ca34168d568a493306f673e98b9019cee9c23.1332524700.git.hvoigt@hvoigt.net","threadId":"30041","inReplyTo":null,"subject":"[GIT GUI PATCH] git-gui: open console when using --trace on windows","fromName":"Heiko Voigt","fromEmail":"hvoigt@hvoigt.net","sentAt":"2012-03-23T17:46:27Z","receivedAt":"2012-03-23T17:46:27Z","isPatch":true,"sender":{"key":"hvoigt@hvoigt.net","avatar":"https://avatars.githubusercontent.com/u/184958?v=4"},"body":"When starting a gui program on windows stdout, stderr and stdin are not\nconnected to the cmd console. As a workaround tk has a console window.\nLets open this when the --trace commandline option has been given.\nThis is helpful for debugging.\n\nSigned-off-by: Heiko Voigt <hvoigt@hvoigt.net>\n---\n git-gui/git-gui.sh |    1 +\n 1 file changed, 1 insertion(+)\n\ndiff --git a/git-gui/git-gui.sh b/git-gui/git-gui.sh\nindex ba4e5c1..7dddc7d 100755\n--- a/git-gui/git-gui.sh\n+++ b/git-gui/git-gui.sh\n@@ -154,6 +154,7 @@ set _trace [lsearch -exact $argv --trace]\n if {$_trace >= 0} {\n \tset argv [lreplace $argv $_trace $_trace]\n \tset _trace 1\n+\tif {[tk windowingsystem] eq \"win32\"} { console show }\n } else {\n \tset _trace 0\n }\n-- \n1.7.10.rc1.28.g242ca\n"}]}