diff options
author | Taylor Blau <me@ttaylorr.com> | 2020-05-13 15:59:37 -0600 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2020-05-13 15:20:45 -0700 |
commit | 630cd5194e6fcf928290a5c0f85e4094559197c8 (patch) | |
tree | 9344b75020c90a3b49f51d1c859f7e3170e2d656 /perl/Git/LoadCPAN.pm | |
parent | commit-graph.c: show progress of finding reachable commits (diff) | |
download | tgif-630cd5194e6fcf928290a5c0f85e4094559197c8.tar.xz |
commit-graph.c: peel refs in 'add_ref_to_set'
While iterating references (to discover the set of commits to write to
the commit-graph with 'git commit-graph write --reachable'),
'add_ref_to_set' can save 'fill_oids_from_commits()' some time by
peeling the references beforehand.
Move peeling out of 'fill_oids_from_commits()' and into
'add_ref_to_set()' to use 'peel_ref()' instead of 'deref_tag()'. Doing
so allows the commit-graph machinery to use the peeled value from
'$GIT_DIR/packed-refs' instead of having to load and parse tags.
While we're at it, discard non-commit objects reachable from ref tips.
This would be done automatically by 'fill_oids_from_commits()', but such
functionality will be removed in a subsequent patch after the call to
'lookup_commit_reference_gently' is dropped (at which point a non-commit
object in the commits oidset will become an error).
Suggested-by: Jeff King <peff@peff.net>
Signed-off-by: Taylor Blau <me@ttaylorr.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'perl/Git/LoadCPAN.pm')
0 files changed, 0 insertions, 0 deletions