aboutsummaryrefslogtreecommitdiff
path: root/git_hooks_client/git_hooks_client.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Add SPDX license headers to git_hooks_clientRunxi Yu10 days1-0/+6
|
* git_hooks_client.c: Don't print wrongly-lengthed cookiesRunxi Yu2025-02-181-2/+1
|
* hooks: Fix the race condition that causes EPIPERunxi Yu2025-02-181-0/+10
| | | | | | | | | | | | The hooks handler in the main daemon didn't wait for the hook client to write fully, and sometimes prematurely closes the connection, causing the hook client's splice to return EPIPE (or SIGPIPE if the signal handler wasn't installed). To remedy this, we call shutdown(sock, SHUT_WR) in the client, so that attempts to read on the server side return EOF. Then we can simply use io.Copy(&buf, conn) on the server side to fetch all of the data into a buffer.
* git_hooks_client.c: Ignore SIGPIPERunxi Yu2025-02-181-0/+6
|
* git_hooks_client.c: Allow ECONNRESET when splicing sock -> stderrRunxi Yu2025-02-181-1/+2
| | | | | Not exactly sure what's happening, but it looks like conn.Close() in Go sometimes produces an ECONNRESET in here.
* hooks, etc.: Authenticate hooks, and handle them in the spawning threadRunxi Yu2025-02-171-1/+28
|
* git_hooks_client: Send argc/argv over the UNIX domain socketRunxi Yu2025-02-171-5/+34
|
* git_hooks_client.c: Explain the code in more detailRunxi Yu2025-02-171-7/+28
|
* git_hooks_client.c: Splice socket to stderrRunxi Yu2025-02-171-15/+42
| | | | This allows the daemon to send status messages to the hook handler.
* git_hooks_client.c: Clarify error messagesRunxi Yu2025-02-171-10/+10
|
* git_hooks_client.c: Get return value from unix socketRunxi Yu2025-02-171-1/+20
|
* git_hooks_client: Restructure for clarityRunxi Yu2025-02-171-23/+28
|
* git_hooks_client: Produce useful error message on missing env varRunxi Yu2025-02-171-0/+1
|
* git_hooks_client: Ensure stdin is a pipeRunxi Yu2025-02-171-1/+22
|
* git_hooks_client: Splice stdinRunxi Yu2025-02-171-10/+13
| | | | | | Requires stdin to be a pipe. So `cat | ./git_hooks_client` works while `./git_hooks_client` in a terminal directly does not (character devices are not pipes).
* git_hooks{.go,_client}: Add stub for git hook clientsRunxi Yu2025-02-171-0/+43