diff --git a/commands/command_pre_push.go b/commands/command_pre_push.go index 1eabdf5a..6e8fd874 100644 --- a/commands/command_pre_push.go +++ b/commands/command_pre_push.go @@ -7,6 +7,7 @@ import ( "github.com/git-lfs/git-lfs/git" "github.com/git-lfs/git-lfs/lfs" + "github.com/rubyist/tracerx" "github.com/spf13/cobra" ) @@ -66,6 +67,8 @@ func prePushCommand(cmd *cobra.Command, args []string) { continue } + tracerx.Printf("pre-push: %s", line) + left, right := decodeRefs(line) if left == prePushDeleteBranch { continue diff --git a/httputil/http.go b/httputil/http.go index 01bbf821..d93f5424 100644 --- a/httputil/http.go +++ b/httputil/http.go @@ -272,7 +272,7 @@ func (c *CountingReadCloser) Read(b []byte) (int, error) { c.Count += n - if c.isTraceableType { + if n > 0 && c.isTraceableType { chunk := string(b[0:n]) if c.useGitTrace { tracerx.Printf("HTTP: %s", chunk)