On Tue, Jun 16, 2020 at 07:20:37PM +0000, Han-Wen Nienhuys via GitGitGadget wrote: > +static int reftable_init_db(struct ref_store *ref_store, struct strbuf *err) > +{ > + struct git_reftable_ref_store *refs = > + (struct git_reftable_ref_store *)ref_store; > + struct strbuf sb = STRBUF_INIT; > + > + safe_create_dir(refs->reftable_dir, 1); > + > + strbuf_addf(&sb, "%s/HEAD", refs->repo_dir); > + write_file(sb.buf, "ref: refs/.invalid"); The "Backward compatibility" section of the specs says: * `.git/HEAD`, a regular file containing `ref: refs/heads/.invalid`. not "refs/.invalid". > + strbuf_reset(&sb); > + > + strbuf_addf(&sb, "%s/refs", refs->repo_dir); > + safe_create_dir(sb.buf, 1); > + strbuf_reset(&sb); > + > + strbuf_addf(&sb, "%s/refs/heads", refs->repo_dir); > + write_file(sb.buf, "this repository uses the reftable format"); > + > + return 0; > +}