Re: [PATCH v17 12/17] Reftable support for git-core

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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;
> +}



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux