diff options
| author | Patrick Steinhardt <ps@pks.im> | 2024-05-17 10:18:19 +0200 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2024-05-17 10:33:36 -0700 |
| commit | ed93ea16025decb60eb91308d682884e263e6f85 (patch) | |
| tree | ed27ff45724032a288d82cbd745bd128a4f8bd87 /builtin/worktree.c | |
| parent | 1febabff7a3945537b5cd7ec0ad4a4e8b2ba9001 (diff) | |
| download | git-ed93ea16025decb60eb91308d682884e263e6f85.tar.gz | |
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 'builtin/worktree.c')
| -rw-r--r-- | builtin/worktree.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/worktree.c b/builtin/worktree.c index 108cfa156a..49d9632aa8 100644 --- a/builtin/worktree.c +++ b/builtin/worktree.c @@ -509,7 +509,7 @@ static int add_worktree(const char *path, const char *refname, } wt_refs = get_worktree_ref_store(wt); - ret = refs_init_db(wt_refs, REFS_INIT_DB_IS_WORKTREE, &sb); + ret = ref_store_create_on_disk(wt_refs, REF_STORE_CREATE_ON_DISK_IS_WORKTREE, &sb); if (ret) goto done; |
