Sign in

Search issue titles and bodies, change requests and comments. Private repositories you cannot read are not included.

vole
Clone

Read only, no credentials:

https://rodent.software/git/vole.git

Write over SSH with a registered key:

git clone ssh://git@0.0.0.0:2222/vole.git

A free and open-source forge that lives in your Git repo.

Code

392 commit(s) on main

Merge change request 01M70WES5ZZDJ6RP226WB11BBZ: Let people rename and remove their own passkeys keenan · 26m ago 4b8c9e1d
history blame raw 657 B
1//go:build unix
2
3package git
4
5import (
6 "os"
7 "syscall"
8)
9
10// lockFile blocks until this process holds the exclusive lock on f. flock is
11// released when the descriptor closes, including when the process is killed, which
12// is what makes a write that dies mid-commit recoverable without a lock file
13// anybody has to clean up.
14func lockFile(f *os.File) (func(), error) {
15 for {
16 err := syscall.Flock(int(f.Fd()), syscall.LOCK_EX)
17 if err == nil {
18 return func() { _ = syscall.Flock(int(f.Fd()), syscall.LOCK_UN) }, nil
19 }
20 // A signal can interrupt the wait; the lock is not held, so ask again.
21 if err != syscall.EINTR {
22 return nil, err
23 }
24 }
25}
26