summaryrefslogtreecommitdiffstats
path: root/refs.h
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2024-01-26 17:54:46 +0100
committerJunio C Hamano <gitster@pobox.com>2024-01-26 17:54:46 +0100
commitdc8ce995a2ad203ffb5ef335682b64da955e645a (patch)
tree5fb18d234cc42148bbd37754477fded0bff1cca4 /refs.h
parentMerge branch 'ps/commit-graph-write-leakfix' (diff)
parentbuiltin/worktree: create refdb via ref backend (diff)
downloadgit-dc8ce995a2ad203ffb5ef335682b64da955e645a.tar.xz
git-dc8ce995a2ad203ffb5ef335682b64da955e645a.zip
Merge branch 'ps/worktree-refdb-initialization'
Instead of manually creating refs/ hierarchy on disk upon a creation of a secondary worktree, which is only usable via the files backend, use the refs API to populate it. * ps/worktree-refdb-initialization: builtin/worktree: create refdb via ref backend worktree: expose interface to look up worktree by name builtin/worktree: move setup of commondir file earlier refs/files: skip creation of "refs/{heads,tags}" for worktrees setup: move creation of "refs/" into the files backend refs: prepare `refs_init_db()` for initializing worktree refs
Diffstat (limited to 'refs.h')
-rw-r--r--refs.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/refs.h b/refs.h
index 11b3b6ccea..303c5fac4d 100644
--- a/refs.h
+++ b/refs.h
@@ -126,7 +126,9 @@ int should_autocreate_reflog(const char *refname);
int is_branch(const char *refname);
-int refs_init_db(struct strbuf *err);
+#define REFS_INIT_DB_IS_WORKTREE (1 << 0)
+
+int refs_init_db(struct ref_store *refs, int flags, struct strbuf *err);
/*
* Return the peeled value of the oid currently being iterated via