diff options
author | Derrick Stolee <dstolee@microsoft.com> | 2018-05-01 15:47:15 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-05-22 06:36:34 +0300 |
commit | 819807b33f820dc17d96f043747daf18c5e38516 (patch) | |
tree | a631978767968ce79e76f5937e998f1d8a18d03e /commit.c | |
parent | e2838d85b6d35592ff5851d67f0232a78083ada7 (diff) |
ref-filter: use generation number for --contains
A commit A can reach a commit B only if the generation number of A
is strictly larger than the generation number of B. This condition
allows significantly short-circuiting commit-graph walks.
Use generation number for '--contains' type queries.
On a copy of the Linux repository where HEAD is contained in v4.13
but no earlier tag, the command 'git tag --contains HEAD' had the
following peformance improvement:
Before: 0.81s
After: 0.04s
Rel %: -95%
Helped-by: Jeff King <peff@peff.net>
Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'commit.c')
0 files changed, 0 insertions, 0 deletions