Re: [PATCH] commit-graph: when incompatible with graphs, indicate why
- From
Derrick Stolee <stolee@gmail.com>
- Date
- Feb 11, 2021, 16:17 UTC
- Message-ID
- <aa368496-2875-c383-e862-06e9c587af60@gmail.com>
- In-Reply-To
- <pull.875.git.1613057954213.gitgitgadget@gmail.com>
On 2/11/21 10:39 AM, Johannes Schindelin via GitGitGadget wrote:
Show 8 quoted lines
> From: Johannes Schindelin <johannes.schindelin@gmx.de> > > When `gc.writeCommitGraph = true`, it is possible that the commit-graph > is _still_ not written: replace objects, grafts and shallow repositories > are incompatible with the commit-graph feature. > > Under such circumstances, we need to indicate to the user why the > commit-graph was not written instead of staying silent about it.
This feedback is valuable for these corner cases, especially now that the commit-graph is getting less and less "optional" as time goes on.
> + if (hashmap_get_size(&r->objects->replace_map->map)) {
> + warning(_("repository contains replace objects; "
> + "skipping commit-graph"));...
> + warning(_("repository is shallow; skipping commit-graph"));These warnings make sense to me.
Thanks, -Stolee