Re: [PATCH v3 08/14] commit-graph: implement 'git-commit-graph clear'
- From
- Jonathan Tan <jonathantanmy@google.com>
- Date
- Feb 13, 2018, 22:49 UTC
- Message-ID
- <20180213144929.174b7e3304ab592d2f8c0aea@google.com>
- In-Reply-To
- <1518122258-157281-9-git-send-email-dstolee@microsoft.com>
On Thu, 8 Feb 2018 15:37:32 -0500 Derrick Stolee <stolee@gmail.com> 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).
Show 5 quoted lines
> 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.