gitk: Fix GIT_TRACE issues
authorAske Olsson <askeolsson@gmail.com>
Thu, 10 May 2012 10:13:43 +0000 (12:13 +0200)
committerPaul Mackerras <paulus@samba.org>
Sat, 4 Aug 2012 09:32:40 +0000 (19:32 +1000)
Check if GIT_TRACE env var is set and unset it if it is.

If the environment var GIT_TRACE=1 exists gitk will fail when trying
to find gitdir:
$ git rev-parse --git-dir
trace: built-in: git 'rev-parse' '--git-dir'
.git

Other git commands will also show debug output hence not work as
intended.

Signed-off-by: Aske Olsson <askeolsson@gmail.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
gitk
diff --git a/gitk b/gitk
index 9bba9aa8d1128c4e2b52b26060e727511ebbb221..1f412bb5e5376b69c69ef0a0b78660b6f8e53c27 100755 (executable)
--- a/gitk
+++ b/gitk
@@ -11532,6 +11532,11 @@ if {[catch {package require Tk 8.4} err]} {
     exit 1
 }
 
+# Unset GIT_TRACE var if set
+if { [info exists ::env(GIT_TRACE)] } {
+    unset ::env(GIT_TRACE)
+}
+
 # defaults...
 set wrcomcmd "git diff-tree --stdin -p --pretty"