Thread (11 messages) flat view 11 messages, 2 authors, 2024-09-05

Re: [PATCH 2/2] refs/files: use heuristic to decide whether to repack with `--auto`

From: Patrick Steinhardt <hidden>
Date: 2024-09-04 08:49:47

On Tue, Sep 03, 2024 at 02:00:16AM -0700, karthik nayak wrote:
Patrick Steinhardt [off-list ref] writes:
quoted
The `--auto` flag for git-pack-refs(1) allows the ref backend to decide
whether or not a repack is in order. This switch has been introduced
mostly with the "reftable" backend in mind, which already knows to
auto-compact its tables during normal operations. When the flag is set,
then it will use the same auto-compaction mechanism and thus end up
doing nothing in most cases.

The "files" backend does not have any such heuristic yet and instead
Nit: s/instead/will instead/
quoted
packs any loose references unconditionally. So we rewrite the complete
"packed-refs" file even if there's only a single loose reference to be
packed.
Revisiting this: isn't the current version of this sentence correct?
Replacing it with "will instead" certainly makes it incorrect without
also changing "packs" to "pack".

Patrick
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help