On Fri, Dec 29, 2023 at 5:16 AM Patrick Steinhardt <ps@xxxxxx> wrote: > The files ref backend will create both "refs/heads" and "refs/tags" in > the Git directory. While this logic makes sense for normal repositories, > it does not fo worktrees because those refs are "common" refs that would > always be contained in the main repository's ref database. s/fo/for/ (not worth a reroll) > Introduce a new flag telling the backend that it is expected to create a > per-worktree ref database and skip creation of these dirs in the files > backend when the flag is set. No other backends (currently) need > worktree-specific logic, so this is the only required change to start > creating per-worktree ref databases via `refs_init_db()`. > > Signed-off-by: Patrick Steinhardt <ps@xxxxxx>