Re: [PATCH v3 07/14] commit-graph: update graph-head during write

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

 



On Thu,  8 Feb 2018 15:37:31 -0500
Derrick Stolee <stolee@xxxxxxxxx> wrote:

> It is possible to have multiple commit graph files in a pack directory,
> but only one is important at a time. Use a 'graph_head' file to point
> to the important file. Teach git-commit-graph to write 'graph_head' upon
> writing a new commit graph file.

You should probably include the rationale for a special "graph_head"
file that you describe here [1] in the commit message.

[1] https://public-inbox.org/git/99543db0-26e4-8daa-a580-b618497e48ba@xxxxxxxxx/

> +char *get_graph_head_filename(const char *pack_dir)
> +{
> +	struct strbuf fname = STRBUF_INIT;
> +	strbuf_addstr(&fname, pack_dir);
> +	strbuf_addstr(&fname, "/graph-head");
> +	return strbuf_detach(&fname, 0);

NULL, not 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