Commit ecc0ecd
committed
Speed up hasCommits check
`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.1 parent 78292ef commit ecc0ecd
1 file changed
+2
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
297 | 297 | | |
298 | 298 | | |
299 | 299 | | |
300 | | - | |
301 | | - | |
| 300 | + | |
| 301 | + | |
302 | 302 | | |
303 | 303 | | |
304 | 304 | | |
| |||
0 commit comments