Skip to content
Permalink
Browse files

In hookdebug mode, enable tracing

Signed-off-by: Patrick Uiterwijk <patrick@puiterwijk.org>
  • Loading branch information...
puiterwijk committed Apr 13, 2019
1 parent c510178 commit f9f5015ba5db32ade08d095eacb860e0bdd5f289
Showing with 8 additions and 0 deletions.
  1. +8 −0 hookrun/prepare.go
@@ -113,6 +113,10 @@ func cloneRepository(request datastructures.HookRunRequest) (string, error) {
path.Join(workdir, "hookrun", "clone"),
)
if debug {
cmd.Env = []string{
"GIT_TRACE=2",
"GIT_TRACE_PACKET=1",
}
cmd.Stdout = os.Stdout
cmd.Stderr = os.Stderr
}
@@ -163,6 +167,10 @@ func fetchFakeRefs(request datastructures.HookRunRequest, workdir string) error
)
cmd.Dir = path.Join(workdir, "hookrun", "clone")
if debug {
cmd.Env = []string{
"GIT_TRACE=2",
"GIT_TRACE_PACKET=1",
}
cmd.Stdout = os.Stdout
cmd.Stderr = os.Stderr
}

0 comments on commit f9f5015

Please sign in to comment.
You can’t perform that action at this time.