Signed-off-by: Seongmin Lee git@boltless.me
+24
-34
knotserver/git.go
+40
knotserver/router.go
History
3 rounds
5 comments
1 commit
expand
collapse
Signed-off-by: Seongmin Lee <git@boltless.me>
3/3 success
expand
collapse
1 commit
expand
collapse
Signed-off-by: Seongmin Lee <git@boltless.me>
3/3 success
expand
collapse
expand 0 comments
1 commit
expand
collapse
Signed-off-by: Seongmin Lee <git@boltless.me>
expand 3 comments
This solves the fatal: protocol error: bad line length character: fail bug while git clone over http.
Most cases, that error happens when target repository is not found. So I added a middleware resolveRepo to check the repository existence first and resolve its absolute path at one place.
knotserver/git.go:54: the text here can be "Failed to find repository path"
knotserver/git.go:99: likewise here
knotserver/router.go:168: why not handle th error as 500 here?
knotserver/router.go:166: do we know for sure that the repo path will include .git? none of the paths on my knot include this.
Ah right. I forgot to update after minimum PoC. Sorry for the incomplete PR.
I resubmitted. Unfortunately couldn't test it right now, but it should work fine.
tested and now it works as expected
before#
after#