Thread (94 messages) 94 messages, 5 authors, 2018-02-26

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

From: Jonathan Tan <hidden>
Date: 2018-02-13 22:39:02

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.
+}
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help