Re: [PATCH v3 07/14] commit-graph: update graph-head during write
- From
- Jonathan Tan <jonathantanmy@google.com>
- Date
- Feb 13, 2018, 22:38 UTC
- Message-ID
- <20180213143853.00cbd0fd2a17131beb2e08b7@google.com>
- In-Reply-To
- <1518122258-157281-8-git-send-email-dstolee@microsoft.com>
On Thu, 8 Feb 2018 15:37:31 -0500 Derrick Stolee <stolee@gmail.com> 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@gmail.com/
Show 6 quoted lines
> +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.
> +}