summaryrefslogtreecommitdiffstats
path: root/refs.h
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2024-06-06 07:29:39 +0200
committerJunio C Hamano <gitster@pobox.com>2024-06-06 18:04:33 +0200
commit64a6dd8ffc2f120fc13e438af3236aa00cebc241 (patch)
tree6ec995c11d46992c8bc9745880a8ca3a6cd1cfcf /refs.h
parentworktree: don't store main worktree twice (diff)
downloadgit-64a6dd8ffc2f120fc13e438af3236aa00cebc241.tar.xz
git-64a6dd8ffc2f120fc13e438af3236aa00cebc241.zip
refs: implement removal of ref storages
We're about to introduce logic to migrate ref storages. One part of the migration will be to delete the files that are part of the old ref storage format. We don't yet have a way to delete such data generically across ref backends though. Implement a new `delete` callback and expose it via a new `ref_storage_delete()` function. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'refs.h')
-rw-r--r--refs.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/refs.h b/refs.h
index 50a2b3ab09..61ee7b7a15 100644
--- a/refs.h
+++ b/refs.h
@@ -130,6 +130,11 @@ int ref_store_create_on_disk(struct ref_store *refs, int flags, struct strbuf *e
void ref_store_release(struct ref_store *ref_store);
/*
+ * Remove the ref store from disk. This deletes all associated data.
+ */
+int ref_store_remove_on_disk(struct ref_store *refs, struct strbuf *err);
+
+/*
* Return the peeled value of the oid currently being iterated via
* for_each_ref(), etc. This is equivalent to calling:
*