Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
vvatanabe committed May 15, 2018
2 parents 0c458e8 + 90a0fcc commit 07989e4
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Intellij idea
.idea/*
*.iml

# Binaries for programs and plugins
*.exe
Expand Down
3 changes: 3 additions & 0 deletions githttpxfer/githttpxfer.go
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,9 @@ func (ghx *GitHTTPXfer) serviceRPC(ctx Context, rpc string) {
RenderInternalServerError(res.Writer)
return
}
// "git-upload-pack" waits for the remaining input and it hangs,
// so must close it after completing the copy request body to standard input.
stdin.Close()

res.SetContentType(fmt.Sprintf("application/x-git-%s-result", rpc))
res.WriteHeader(http.StatusOK)
Expand Down
7 changes: 7 additions & 0 deletions githttpxfer/githttpxfer_end_to_end_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,10 @@ func Test_End_To_End_it_should_succeed_clone_and_push_and_fetch_and_log(t *testi

destDirNameA := "test_a"
destDirNameB := "test_b"
destDirNameC := "test_c"
destDirPathA := path.Join(endToEndTestParams.workingDirPath, destDirNameA)
destDirPathB := path.Join(endToEndTestParams.workingDirPath, destDirNameB)
destDirPathC := path.Join(endToEndTestParams.workingDirPath, destDirNameC)

if _, err := execCmd("", "git", "clone", remoteRepoUrl, destDirPathA); err != nil {
t.Errorf("execute command error: %s", err.Error())
Expand Down Expand Up @@ -148,6 +150,11 @@ func Test_End_To_End_it_should_succeed_clone_and_push_and_fetch_and_log(t *testi
return
}

if _, err := execCmd("", "git", "clone", "--depth=1", remoteRepoUrl, destDirPathC); err != nil {
t.Errorf("execute command error: %s", err.Error())
return
}

}

func Test_End_To_End_it_should_succeed_request_to_get_info_refs(t *testing.T) {
Expand Down

0 comments on commit 07989e4

Please sign in to comment.