Re: [PATCH v2 2/6] commit-graph: always parse before commit_graph_data_at()
- From
Derrick Stolee <stolee@gmail.com>
- Date
- Feb 3, 2021, 03:09 UTC
- Message-ID
- <247b0056-8358-f71f-22ee-0bacfbc4239d@gmail.com>
- In-Reply-To
- <xmqq7dnpewg4.fsf@gitster.c.googlers.com>
On 2/2/2021 9:06 PM, Junio C Hamano wrote:
Show 9 quoted lines
> Derrick Stolee <stolee@gmail.com> writes: > >>> - what is the recommended way to recover from this state? "git fsck" >>> shows the repositories to have no problems. "git help commit-graph" >>> doesn't show a command for users to use; is >>> `rm -fr .git/objects/info/commit-graphs/` the recommended recovery >>> command? > > "rm -f .git/objects/info/commit-graph" as well, no?
In this case, that won't be necessary since they are using a split commit-graph. However, the following is what I do to be extra sure:
rm -rf .git/objects/info/commit-graph*
Deletes the singleton file and the directory.
Show 7 quoted lines
>> That, followed by `git commit-graph write --reachable [--changed-paths]` >> depending on what they want. > > Just out of curiosity, how important is "--reachable"? It only > traverses from the tips of refs and unlike fsck and repack, not from > reflog entries (or the index for that matter, but that shouldn't > make much difference as there is no _commit_ in the index).
I just like to focus on the reachable commits starting at refs instead of scanning all packed objects to see which are commits or not.
Thanks, -stolee