git: use system's git upload-pack This is an intermediate workaround for https://github.com/go-git/go-git/issues/1062. This should also fix #33.
1 file changed, 25 insertions(+), 0 deletions(-)
changed files
A git/service/write_flusher.go
@@ -0,0 +1,25 @@ +package service + +import ( + "io" + "net/http" +) + +func newWriteFlusher(w http.ResponseWriter) io.Writer { + return writeFlusher{w.(interface { + io.Writer + http.Flusher + })} +} + +type writeFlusher struct { + wf interface { + io.Writer + http.Flusher + } +} + +func (w writeFlusher) Write(p []byte) (int, error) { + defer w.wf.Flush() + return w.wf.Write(p) +}