Skip to content

Commit

Permalink
gitk: Fix GIT_TRACE issues
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Aske Olsson authored and Paul Mackerras committed Aug 4, 2012
1 parent a135f21 commit 0ae1035
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions gitk
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down

0 comments on commit 0ae1035

Please sign in to comment.