aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* *.go: Add some comments for docsRunxi Yu2025-02-1817-20/+52
|
* README.md: Mention that anonymous pushes to contrib/ are possible nowRunxi Yu2025-02-181-1/+2
|
* git_hooks_handle: Allow anonymous pushes to contrib/Runxi Yu2025-02-181-2/+74
|
* main.go: Remove stale UNIX domain socketsRunxi Yu2025-02-181-4/+35
|
* hooks: Fix the race condition that causes EPIPERunxi Yu2025-02-182-0/+17
| | | | | | | | | | | | 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.
* repo_index.html: Move the repo description before the clone URLsRunxi Yu2025-02-181-6/+6
|
* repo_commit.html: Move the commit message out of the tableRunxi Yu2025-02-181-4/+3
|
* 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.
* Revert "style.css: Make it more concise"Runxi Yu2025-02-181-35/+69
| | | | | | This reverts commit ff7e33a9c443fd49a67664d01e50655cc1dc58d3. Broke too much stuff.
* Revert "style.css: Fix .chunk-addition"Runxi Yu2025-02-181-5/+3
| | | | This reverts commit 9f19bcb50de2ced13a22bbe44078d8a47bf9ce41.
* style.css: Fix .chunk-additionRunxi Yu2025-02-181-3/+5
|
* hooks, etc.: Restructure concurrency and data flowRunxi Yu2025-02-172-31/+29
| | | | | | | | | | | | | | | | | | | | | | | | | Previously we accepted handler connections at hooks_handle and used a mess of channels and concurrent maps to let receive_pack handle the session. This doesn't work well because there are conditions where a push occurs but the hook is not called, e.g. when the destination branch is up to date. There is no reliable way of checking whether the subprocess is going to call the hook or not; it's technically possible to parse stderr but that interface is not guaranteed to be stable and IIRC has changed in the past). So receive_pack would be waiting on the channel to receive a hooks connection to handle but it'll never receive one, causing a deadlock. This entire thing was overengineered and was very prone to error. Here we let receive_pack put the cookie into the map, then start and wait for the subprocess to finish. When the hook actually runs and connects to its UNIX domain socket, the handler would check its cookie within the map. If the hook doesn't run, then nothing happens. The git-receive-pack subprocess blocks the execution of the SSH handler, and when git-receive-pack exists, the SSH handler (using a defer) deletes the cookie from the map. There may be caveats in signal handling or other cases that cause the cookie to be deleted from the map prematurely.
* remote_url.go: Don't use path.Join (it strips :// into :/)Runxi Yu2025-02-171-3/+3
|
* style.css: Make it more conciseRunxi Yu2025-02-171-69/+35
|
* ssh_handle_receive_pack.go: Move unauthorized rejectionRunxi Yu2025-02-171-4/+6
|
* git_hooks_handle.go: Remove err_not_unixconnRunxi Yu2025-02-171-1/+0
| | | | | As this always suggests a programming mistake, we do not check the type assertion, causing it to panic if the types don't match.
* ssh_handle_receive_pack.go: Allow pushes for nowRunxi Yu2025-02-171-1/+1
|
* ssh_handle_receive_pack.go: Rename c -> deployer_channelRunxi Yu2025-02-171-3/+3
|
* hooks, etc.: Authenticate hooks, and handle them in the spawning threadRunxi Yu2025-02-173-3/+87
|
* go.mod: Bump lindenii-common (cmap split into ComparableMap and Map)Runxi Yu2025-02-172-3/+3
|
* git_hooks_handle.go: Read argv from hookRunxi Yu2025-02-171-7/+33
|
* git_hooks_client: Send argc/argv over the UNIX domain socketRunxi Yu2025-02-171-5/+34
|
* git_hooks_handle.go: Refactor for clarityRunxi Yu2025-02-171-14/+13
|
* README.md: Prominently note Lindenii's own instanceRunxi Yu2025-02-171-0/+6
|
* style.css: :focus -> :focus-visibleRunxi Yu2025-02-171-3/+3
| | | | | | | | Users who actually click on the header label won't get that focus outline any more. It's still provided for keyboard users, for whom the outline may be necessary for accessibility. References: https://stackoverflow.com/questions/31402576
* go.mod: go-billy is now indirectRunxi Yu2025-02-171-1/+1
|
* Makefile: Compile static Go binaryRunxi Yu2025-02-171-1/+1
|
* style.css: Reformat and improve checkbox accessibilityRunxi Yu2025-02-172-13/+19
| | | | | | | | Previously the expandable checkboxes were { display: none; } which made them impossible to focus via the keyboard. Here we change it to { opacity: 0; position: absolute; }, so it becomes keyboard-focusable. Then we add an outline to the <label> when the checkbox is focused so users could visually identify that the checkbox has been focused.
* git_hooks_client.c: Explain the code in more detailRunxi Yu2025-02-171-7/+28
|
* main.go: Restructure for uniformityRunxi Yu2025-02-171-25/+19
|
* git_hooks_handle.go: Exit on UID mismatch, handle >1 connectionsRunxi Yu2025-02-171-15/+21
|
* git_hooks_handle.go, etc.: Listen for connections from hooksRunxi Yu2025-02-173-14/+39
|
* 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.
* Makefile: Don't use --long in git-describeRunxi Yu2025-02-171-1/+1
| | | | We don't need the commit ID if it is known to match a tag.
* README.md: Clarify build dependenciesRunxi Yu2025-02-171-1/+2
|
* 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
|
* database.go: Merge name_desc_t; remove misc.goRunxi Yu2025-02-172-11/+5
|
* {remote_url,ssh_server}.go: Use path.Join instead of trimming and addingRunxi Yu2025-02-172-4/+5
|
* misc.go: Remove environ_to_map as unusedRunxi Yu2025-02-171-14/+0
|
* *_handle_*_pack.go: Pass env LINDENII_FORGE_HOOKS_SOCKET_PATHRunxi Yu2025-02-173-0/+6
|
* *.go: ReformatRunxi Yu2025-02-172-2/+1
|
* git_hooks_deploy.go: Deploy hooks to filesystemRunxi Yu2025-02-172-0/+55
|
* git_hooks_handle.go: Move from git_hooks.goRunxi Yu2025-02-171-0/+0
|
* git_init.go: git_bare_init_with_default_hooksRunxi Yu2025-02-173-5/+35
|
* README.md: s/PGP/SSH/ for commit signature verificationRunxi Yu2025-02-171-2/+2
| | | | Git supports SSH signatures now, and IMO they're far superior to GPG.
* README: Fix typo (sr.ht's CI is builds.sr.ht, not git.sr.ht)Runxi Yu2025-02-171-1/+1
|
* repo_{info,upload_pack}.go: Use system git-upload-pack for HTTP tooRunxi Yu2025-02-172-29/+79
|
* ssh_handle_receive_pack: Use system git-receive-packRunxi Yu2025-02-171-33/+18
|