aboutsummaryrefslogtreecommitdiff
path: root/odb.h
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2025-11-03 08:41:57 +0100
committerJunio C Hamano <gitster@pobox.com>2025-11-03 12:18:45 -0800
commit0820a4b120f310d87ac8817ade63896a901c9267 (patch)
treeae09af4fe9d92824d1fa5ce2eb61f03e52788795 /odb.h
parentf82e430b4e46120e0ef67959e0ef9d8ab9282c56 (diff)
downloadgit-0820a4b120f310d87ac8817ade63896a901c9267.tar.xz
odb: introduce `odb_source_new()`
We have three different locations where we create a new ODB source. Deduplicate the logic via a new `odb_source_new()` function. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'odb.h')
-rw-r--r--odb.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/odb.h b/odb.h
index e6602dd90c..2bec895d13 100644
--- a/odb.h
+++ b/odb.h
@@ -89,6 +89,10 @@ struct odb_source {
char *path;
};
+struct odb_source *odb_source_new(struct object_database *odb,
+ const char *path,
+ bool local);
+
struct packed_git;
struct packfile_store;
struct cached_object_entry;