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

Re: [PATCH v3 08/14] commit-graph: implement 'git-commit-graph clear'

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

On Thu,  8 Feb 2018 15:37:32 -0500
Derrick Stolee [off-list ref] wrote:
Teach Git to delete the current 'graph_head' file and the commit graph
it references. This is a good safety valve if somehow the file is
corrupted and needs to be recalculated. Since the commit graph is a
summary of contents already in the ODB, it can be regenerated.
Spelling of graph-head (hyphen, not underscore).

I'm not sure of the usefulness of this feature - if the graph is indeed
corrupt, the user can just be instructed to delete graph-head (not even
the commit graph it references, since when we create a new graph-head,
--delete-expired will take care of deleting the old one).
 extern char *get_graph_head_filename(const char *pack_dir);
+extern struct object_id *get_graph_head_hash(const char *pack_dir,
+					     struct object_id *hash);
 extern char* get_commit_graph_filename_hash(const char *pack_dir,
 					    struct object_id *hash);
This file is starting to need documentation - in particular, the
difference between get_graph_head_hash() and
get_commit_graph_filename_hash() is not clear.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help