On Fri, May 21, 2021 at 01:53:49PM -0500, Felipe Contreras wrote: > Patrick Steinhardt wrote: > > In the case where git-receive-pack(1) receives only commands which > > delete references, then per technical specification the client MUST NOT > > send a packfile. As a result, we know that no new objects have been > > received, which makes it a moot point to check whether all received > > objects are fully connected. > > I don't know if this is related but yesterday I decided to delete a > bunch of refs from a forked repo in GitHub. I did it naively with a for > loop and so it was doing a bunch of `git push myrepo :ref`. > > It was unbearably slow. > > Sure, it was a stupid thing to do, but maybe it can help you do some > tests. Patrick's patch might help some, as it would avoid calling rev-list at all. But we wouldn't do any traversal in that command if there are no positive tips anyway, so it is really just saving the startup overhead of iterating the ref tips to add them to the traversal. In the case of GitHub, the problem is much more likely outside of Git's immediate control. Every push will run GitHub-specific hooks for things like branch protections, etc, and there's a lot of overhead there. -Peff