aboutsummaryrefslogtreecommitdiffstats
path: root/refs/debug.c
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2024-05-17 10:18:19 +0200
committerJunio C Hamano <gitster@pobox.com>2024-05-17 10:33:36 -0700
commited93ea16025decb60eb91308d682884e263e6f85 (patch)
treeed27ff45724032a288d82cbd745bd128a4f8bd87 /refs/debug.c
parentrefs: adjust names for `init` and `init_db` callbacks (diff)
downloadgit-ed93ea16025decb60eb91308d682884e263e6f85.tar.gz
git-ed93ea16025decb60eb91308d682884e263e6f85.zip
refs: rename `init_db` callback to avoid confusion
Reference backends have two callbacks `init` and `init_db`. The similarity of these two callbacks has repeatedly confused me whenever I was looking at them, where I always had to look up which of them does what. Rename the `init_db` callback to `create_on_disk`, which should hopefully be clearer. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'refs/debug.c')
-rw-r--r--refs/debug.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/refs/debug.c b/refs/debug.c
index c7531b17f0..4cc4910974 100644
--- a/refs/debug.c
+++ b/refs/debug.c
@@ -33,11 +33,11 @@ struct ref_store *maybe_debug_wrap_ref_store(const char *gitdir, struct ref_stor
return (struct ref_store *)res;
}
-static int debug_init_db(struct ref_store *refs, int flags, struct strbuf *err)
+static int debug_create_on_disk(struct ref_store *refs, int flags, struct strbuf *err)
{
struct debug_ref_store *drefs = (struct debug_ref_store *)refs;
- int res = drefs->refs->be->init_db(drefs->refs, flags, err);
- trace_printf_key(&trace_refs, "init_db: %d\n", res);
+ int res = drefs->refs->be->create_on_disk(drefs->refs, flags, err);
+ trace_printf_key(&trace_refs, "create_on_disk: %d\n", res);
return res;
}
@@ -427,7 +427,7 @@ static int debug_reflog_expire(struct ref_store *ref_store, const char *refname,
struct ref_storage_be refs_be_debug = {
.name = "debug",
.init = NULL,
- .init_db = debug_init_db,
+ .create_on_disk = debug_create_on_disk,
/*
* None of these should be NULL. If the "files" backend (in