detached b42de97

docs(ermitegit): document negative MaxObjectSize and which writes refresh at once

commit
b42de979c3a2b7b0db2f5456396030d50462b9da
author
brice · · 2026-10-11 02:08 UTC
parent
23f3a22
signature
GPG VerifiedCD88F9E564E0102646FB6077A1A07C7C7C3E349D · arch-gpg Verified for the committer email
2 files · +9 -7
M internal/adapters/ermitegit/ermitegit.go +6 -5
@@ -22,10 +22,10 @@
2222 // The adapter still calls Refresh to release replaced packs, pick up a new
2323 // commit-graph and notice a repository that stopped being supported: at once
2424 // when ermite itself wrote (the push and the maintenance tell it through
25-// Refresh), and as a safety net at most once per Config.RefreshEvery for each
26-// repository while it is read, by one reader at a time. A Refresh
27-// stats the files of the repository, too much to pay on every read of a
28-// method that itself costs 2 µs.
25+// Refresh; a merge request merge waits for its maintenance), and as a safety
26+// net at most once per Config.RefreshEvery for each repository while it is
27+// read, by one reader at a time. A Refresh stats the files of the repository,
28+// too much to pay on every read of a method that itself costs 2 µs.
2929 //
3030 // Memory: the cache of open repositories is bounded (LRU) and drops the ones
3131 // idle longer than Config.IdleTTL; each repository holds at most
@@ -127,7 +127,8 @@ type Config struct {
127127 DeltaCacheSize int64
128128 // MaxObjectSize is the size in bytes above which an object that must be
129129 // held in memory is read by the wrapped reader instead. Zero means
130- // DefaultMaxObjectSize.
130+ // DefaultMaxObjectSize; a negative value means the library default
131+ // (128 MiB).
131132 MaxObjectSize int64
132133 // Routes overrides DefaultRoutes when not nil.
133134 Routes *Routes
@@ -22,10 +22,10 @@
22 // The adapter still calls Refresh to release replaced packs, pick up a new22 // The adapter still calls Refresh to release replaced packs, pick up a new
23 // commit-graph and notice a repository that stopped being supported: at once23 // commit-graph and notice a repository that stopped being supported: at once
24 // when ermite itself wrote (the push and the maintenance tell it through24 // when ermite itself wrote (the push and the maintenance tell it through
25-// Refresh), and as a safety net at most once per Config.RefreshEvery for each25+// Refresh; a merge request merge waits for its maintenance), and as a safety
26-// repository while it is read, by one reader at a time. A Refresh26+// net at most once per Config.RefreshEvery for each repository while it is
27-// stats the files of the repository, too much to pay on every read of a27+// read, by one reader at a time. A Refresh stats the files of the repository,
28-// method that itself costs 2 µs.28+// too much to pay on every read of a method that itself costs 2 µs.
29 //29 //
30 // Memory: the cache of open repositories is bounded (LRU) and drops the ones30 // Memory: the cache of open repositories is bounded (LRU) and drops the ones
31 // idle longer than Config.IdleTTL; each repository holds at most31 // idle longer than Config.IdleTTL; each repository holds at most
@@ -127,7 +127,8 @@ type Config struct {
127 DeltaCacheSize int64127 DeltaCacheSize int64
128 // MaxObjectSize is the size in bytes above which an object that must be128 // MaxObjectSize is the size in bytes above which an object that must be
129 // held in memory is read by the wrapped reader instead. Zero means129 // held in memory is read by the wrapped reader instead. Zero means
130- // DefaultMaxObjectSize.130+ // DefaultMaxObjectSize; a negative value means the library default
131+ // (128 MiB).
131 MaxObjectSize int64132 MaxObjectSize int64
132 // Routes overrides DefaultRoutes when not nil.133 // Routes overrides DefaultRoutes when not nil.
133 Routes *Routes134 Routes *Routes
M internal/app/pushes.go +3 -2
@@ -127,8 +127,9 @@ func (u *Pushes) Check(ctx context.Context, p domain.Principal, name domain.Repo
127127
128128 // Record is the post-receive step of an accepted push: it sets pushed_at,
129129 // repairs HEAD when it points to a missing branch, tells the reader that the
130-// repository changed, publishes a PushEvent and schedules maintenance. Every step runs even when an earlier one fails; the
131-// failures are returned together and the push itself is not affected.
130+// repository changed, publishes a PushEvent and schedules maintenance. Every
131+// step runs even when an earlier one fails; the failures are returned together
132+// and the push itself is not affected.
132133 func (u *Pushes) Record(ctx context.Context, p domain.Principal, name domain.RepoName, updates []domain.RefUpdate) error {
133134 log := zerowrap.FromCtx(ctx)
134135 now := u.clock.Now().UTC()
@@ -127,8 +127,9 @@ func (u *Pushes) Check(ctx context.Context, p domain.Principal, name domain.Repo
127 127
128 // Record is the post-receive step of an accepted push: it sets pushed_at,128 // Record is the post-receive step of an accepted push: it sets pushed_at,
129 // repairs HEAD when it points to a missing branch, tells the reader that the129 // repairs HEAD when it points to a missing branch, tells the reader that the
130-// repository changed, publishes a PushEvent and schedules maintenance. Every step runs even when an earlier one fails; the130+// repository changed, publishes a PushEvent and schedules maintenance. Every
131-// failures are returned together and the push itself is not affected.131+// step runs even when an earlier one fails; the failures are returned together
132+// and the push itself is not affected.
132 func (u *Pushes) Record(ctx context.Context, p domain.Principal, name domain.RepoName, updates []domain.RefUpdate) error {133 func (u *Pushes) Record(ctx context.Context, p domain.Principal, name domain.RepoName, updates []domain.RefUpdate) error {
133 log := zerowrap.FromCtx(ctx)134 log := zerowrap.FromCtx(ctx)
134 now := u.clock.Now().UTC()135 now := u.clock.Now().UTC()

Keyboard shortcuts

Single-key shortcuts are on. ctrl k and esc work whatever this says.

ctrl k :
go to a section, branch, tag, file or repository
?
this list
j k
move the row cursor down / up
enter
open the row under the cursor; on Files, a directory opens or closes in place
↑ ↓ ← → home end
in the file tree (focus on a row): previous / next row, close / open a directory or go to its parent / first entry, first / last row. They never open a file
l h
on Files: open a directory or a file / close a directory or go up to its parent, then to the parent page. Elsewhere: into the side panel (on a merge request, its files) / back to the content; there j k move between its controls
g g G
first / last row
/
filter the list; on Files, find a file anywhere in the repository (esc clears, enter opens the best match)
b
switch branch or tag
g s g f g c g b g m g i g r g a
tabs: summary, files, commits, branches & tags, merge requests, issues, releases, actions (when available)
g h
home
w
wide mode: use the whole width of the screen, or not (remembered)
y
copy a permalink pinned to the commit
d u x
diff: split / unified / collapse or expand all
e E
diff: the whole file in view / every file, with the lines the hunks hide
n
merge request: next note in the diff
esc
close a dialog, leave a field

Branches 2

Tags 42

↑↓ moveenter openesc close