diff options
| author | Junio C Hamano <gitster@pobox.com> | 2025-11-03 07:27:58 -0800 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2025-11-03 07:27:58 -0800 |
| commit | 8ac48a10de61267858d66383c34833e55a5e9d02 (patch) | |
| tree | c944ea41f08960307abbd4c2c4e558e898e20c4c /builtin/repo.c | |
| parent | Merge branch 'tc/last-modified-active-paths-optimization' into next (diff) | |
| parent | ref-filter: parse objects on demand (diff) | |
| download | git-8ac48a10de61267858d66383c34833e55a5e9d02.tar.gz git-8ac48a10de61267858d66383c34833e55a5e9d02.zip | |
Merge branch 'ps/ref-peeled-tags' into next
Some ref backend storage can hold not just the object name of an
annotated tag, but the object name of the object the tag points at.
The code to handle this information has been streamlined.
* ps/ref-peeled-tags:
ref-filter: parse objects on demand
ref-filter: detect broken tags when dereferencing them
refs: don't store peeled object IDs for invalid tags
object: add flag to `peel_object()` to verify object type
refs: drop infrastructure to peel via iterators
refs: drop `current_ref_iter` hack
builtin/show-ref: convert to use `reference_get_peeled_oid()`
ref-filter: propagate peeled object ID
upload-pack: convert to use `reference_get_peeled_oid()`
refs: expose peeled object ID via the iterator
refs: refactor reference status flags
refs: fully reset `struct ref_iterator::ref` on iteration
refs: introduce `.ref` field for the base iterator
refs: introduce wrapper struct for `each_ref_fn`
Diffstat (limited to 'builtin/repo.c')
| -rw-r--r-- | builtin/repo.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/builtin/repo.c b/builtin/repo.c index 9d4749f79b..f26640bd6e 100644 --- a/builtin/repo.c +++ b/builtin/repo.c @@ -366,16 +366,13 @@ struct count_references_data { struct progress *progress; }; -static int count_references(const char *refname, - const char *referent UNUSED, - const struct object_id *oid, - int flags UNUSED, void *cb_data) +static int count_references(const struct reference *ref, void *cb_data) { struct count_references_data *data = cb_data; struct ref_stats *stats = data->stats; size_t ref_count; - switch (ref_kind_from_refname(refname)) { + switch (ref_kind_from_refname(ref->name)) { case FILTER_REFS_BRANCHES: stats->branches++; break; @@ -396,7 +393,7 @@ static int count_references(const char *refname, * While iterating through references for counting, also add OIDs in * preparation for the path walk. */ - add_pending_oid(data->revs, NULL, oid, 0); + add_pending_oid(data->revs, NULL, ref->oid, 0); ref_count = get_total_reference_count(stats); display_progress(data->progress, ref_count); |
