diff options
Diffstat (limited to '')
-rw-r--r-- | git_hooks_handle.go | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/git_hooks_handle.go b/git_hooks_handle.go index 91f1894..e9b163a 100644 --- a/git_hooks_handle.go +++ b/git_hooks_handle.go @@ -5,6 +5,7 @@ import ( "encoding/binary" "errors" "fmt" + "io" "net" "os" "path/filepath" @@ -72,6 +73,12 @@ func hooks_handle_connection(conn net.Conn) { args = append(args, arg.String()) } + var stdin bytes.Buffer + _, err = io.Copy(&stdin, conn) + if err != nil { + fmt.Fprintln(conn, "Failed to read to the stdin buffer:", err.Error()) + } + switch filepath.Base(args[0]) { case "pre-receive": if pack_to_hook.direct_access { |