On Thu, 8 Feb 2018 15:37:31 -0500
Derrick Stolee [off-list ref] 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/
+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.
+}