summaryrefslogtreecommitdiff
path: root/contrib/persistent-https/socket.go
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2026-06-22 10:47:54 +0200
committerJunio C Hamano <gitster@pobox.com>2026-06-22 10:41:03 -0700
commit27bba4258b9e4bd7a0313e3bb4cce8aeba268712 (patch)
treedeefeca1f3ac69c721df415a3a9f5572b2e75874 /contrib/persistent-https/socket.go
parent1bba44eee3f25b9ce68687d0c85ff55a1840ea71 (diff)
odb/source: generalize `reprepare()` callback
The `reprepare()` callback function can be used to flush caches of a given object source and then prepare it anew. This is for example used when a concurrent process may have written new objects. Ultimately, this can be seen as doing two separate steps: 1. We drop any caches. 2. We prepare the source. We have one callsite in git-grep(1) though that really only want to do (2). This is done by reaching into the "files" backend directly and then calling `odb_source_packed_prepare()`, which of course may not work with alternate backends. We could in theory just call `reprepare()` here, and that would likely not have any significant downside. But this would certainly feel like a code smell. Instead, generalize the `reprepare()` callback to `prepare()` with a flag that optionally instructs the backend to also flush the caches, which allows us to drop the external `odb_source_packed_prepare()` declaration. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'contrib/persistent-https/socket.go')
0 files changed, 0 insertions, 0 deletions