Re: We should add a "git gc --auto" after "git clone" due to commit graph
From: Derrick Stolee <hidden>
Date: 2018-10-03 18:59:39
On 10/3/2018 2:51 PM, Jeff King wrote:
On Wed, Oct 03, 2018 at 08:47:11PM +0200, Ævar Arnfjörð Bjarmason wrote:quoted
On Wed, Oct 03 2018, Stefan Beller wrote:quoted
quoted
So we wouldn't be spending 5 minutes repacking linux.git right after cloning it, just ~10s generating the commit graph, and the same would happen if you rm'd .git/objects/info/commit-graph and ran "git commit", which would kick of "gc --auto" in the background and do the same thing.Or generating local bitmaps or pack idx files as well?I'm less familiar with this area, but when I clone I get a pack *.idx file, why does it need to be regenerated? But yeah, in principle this would be a sensible addition, but I'm not aware of cases where clients get significant benefits from bitmaps (see https://githubengineering.com/counting-objects/), and I don't turn it on for clients, but maybe I've missed something.They don't help yet, and there's no good reason to enable bitmaps for clients. I have a few patches that use bitmaps for things like ahead/behind and --contains checks, but the utility of those may be lessened quite a bit by Stolee's commit-graph work. And if it isn't, I'm mildly in favor of replacing the existing .bitmap format with something better integrated with commit-graphs (which would give us an opportunity to clean up some of the rough edges).
If the commit-graph doesn't improve enough on those applications, then we could consider adding a commit-to-commit reachability bitmap inside the commit-graph. ;) -Stolee