all repos — elgit @ fba146ac6867b13c40802c4d7a21a8a32571473c

fork of legit: web frontend for git, written in go

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.

Anirudh Oppiliappan
commit

fba146ac6867b13c40802c4d7a21a8a32571473c

parent

67e355d5a4f7042d6c16a32afc9119b844d0b467

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) +}