aboutsummaryrefslogtreecommitdiffstats
path: root/builtin/commit.c
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2025-10-23 09:16:17 +0200
committerJunio C Hamano <gitster@pobox.com>2025-11-04 07:32:25 -0800
commitfeaaea4c123e6b94ebbdc2135278946ee9cc8eed (patch)
tree6a3c2af1cf301432ac609512998093468684e198 /builtin/commit.c
parentref-filter: propagate peeled object ID (diff)
downloadgit-feaaea4c123e6b94ebbdc2135278946ee9cc8eed.tar.gz
git-feaaea4c123e6b94ebbdc2135278946ee9cc8eed.zip
builtin/show-ref: convert to use `reference_get_peeled_oid()`
The git-show-ref(1) command has multiple different modes: - It knows to show all references matching a pattern. - It knows to list all references that are an exact match to whatever the user has provided. - It knows to check for reference existence. The first two commands use mostly the same infrastructure to print the references via `show_one()`. But while the former mode uses a proper iterator and thus has a `struct reference` available in its context, the latter calls `refs_read_ref()` and thus doesn't. Consequently, we cannot easily use `reference_get_peeled_oid()` to print the peeled value. Adapt the code so that we manually construct a `struct reference` when verifying refs. We wouldn't ever have the peeled value available anyway as we're not using an iterator here, so we can simply plug in the values we _do_ have. With this change we now have a `struct reference` available at both callsites of `show_one()` and can thus pass it, which allows us to use `reference_get_peeled_oid()` instead of `peel_iterated_oid()`. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/commit.c')
0 files changed, 0 insertions, 0 deletions
w=1'>git-p4: unshelve into refs/remotes/p4-unshelved, not refs/remotes/p4/unshelvedLuke Diamand3-7/+8 2018-10-16mingw: use domain information for default emailJohannes Schindelin4-0/+14 2018-10-16getpwuid(mingw): provide a better default for the user nameJohannes Schindelin1-1/+31 2018-10-16getpwuid(mingw): initialize the structure only onceJohannes Schindelin1-7/+18 2018-10-15fuzz: add fuzz testing for packfile indices.Josh Steadmon5-19/+53 2018-10-15fuzz: add basic fuzz testing target.Josh Steadmon3-0/+48 2018-10-12subtree: performance improvement for finding unexpected parent commitsRoger Strain1-1/+1 2018-10-12diff.c: pass sign_index to emit_line_ws_markupStefan Beller1-7/+5 2018-10-12git-p4: do not fail in verbose mode for missing 'fileSize' keyLuke Diamand1-1/+4 2018-10-12log: fix coloring of certain octopus merge shapesNoam Postavsky2-15/+145 2018-10-12doc: move git-cherry to plumbingDaniels Umanovskis2-12/+1 2018-10-12doc: move git-get-tar-commit-id to plumbingDaniels Umanovskis1-1/+1 2018-10-12split-index: BUG() when cache entry refers to non-existing shared entrySZEDER Gábor1-2/+2 2018-10-12split-index: smudge and add racily clean cache entries to split indexSZEDER Gábor4-8/+46 2018-10-12split-index: don't compare cached data of entries already marked for split indexSZEDER Gábor1-17/+72 2018-10-12split-index: count the number of deleted entriesSZEDER Gábor1-1/+1 2018-10-12t1700-split-index: date back files to avoid racy situationsSZEDER Gábor1-21/+28