Skip to content

Conversation

hjwp
Copy link

@hjwp hjwp commented Jun 27, 2025

git rev-list --all is very slow for large repositories (order of 5s on a repo with 500k commits).

This alternative version works by checking whether HEAD points at a valid commit.

`git rev-list --all` is very slow for large repositories
(order of 5s on a repo with 500k commits).

This alternative version works by checking whether HEAD points at a valid commit,
by using a git command that returns an error code if not.
This means it has to use the 'silentgitignorefailure'
version of the git invocation functions, and check for an error.
@hjwp hjwp force-pushed the speed-up-hascommit-check branch from c013c58 to ecc0ecd Compare July 4, 2025 11:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant