aboutsummaryrefslogtreecommitdiff
path: root/odb/source.h
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2026-03-05 15:19:46 +0100
committerJunio C Hamano <gitster@pobox.com>2026-03-05 11:45:15 -0800
commit47b965079ddd9ced04810d0a8738a1ca94f02268 (patch)
treeaf9780d489930b0d5fc12a28cbb493144e71a45b /odb/source.h
parent87842f68352040858f581b64509932fb91c64f0f (diff)
downloadgit-47b965079ddd9ced04810d0a8738a1ca94f02268.tar.xz
odb/source: make `free()` function pluggable
Introduce a new callback function in `struct odb_source` to make the function pluggable. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'odb/source.h')
-rw-r--r--odb/source.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/odb/source.h b/odb/source.h
index 45b72b81a0..4973fb4251 100644
--- a/odb/source.h
+++ b/odb/source.h
@@ -51,6 +51,12 @@ struct odb_source {
* the current working directory.
*/
char *path;
+
+ /*
+ * This callback is expected to free the underlying object database source and
+ * all associated resources. The function will never be called with a NULL pointer.
+ */
+ void (*free)(struct odb_source *source);
};
/*