Patrick Steinhardt
feaaea4c12
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 >
2025-11-04 07:32:25 -08:00
..
2025-10-02 12:26:11 -07:00
2025-09-16 13:37:03 -07:00
2025-07-01 14:58:24 -07:00
2025-09-24 11:53:50 -07:00
2025-11-04 07:32:24 -08:00
2025-08-21 13:46:59 -07:00
2025-09-16 17:59:53 -07:00
2025-04-15 08:24:35 -07:00
2024-12-13 07:33:36 -08:00
2025-10-20 14:12:18 -07:00
2025-07-23 08:15:18 -07:00
2025-07-23 08:15:22 -07:00
2025-07-23 08:15:22 -07:00
2025-01-17 13:30:03 -08:00
2025-07-23 08:15:22 -07:00
2025-07-23 08:15:22 -07:00
2025-11-04 07:32:24 -08:00
2025-09-29 11:40:35 -07:00
2025-07-23 08:15:21 -07:00
2025-07-23 08:15:18 -07:00
2025-09-12 10:41:18 -07:00
2025-07-23 08:15:22 -07:00
2025-09-29 11:40:35 -07:00
2025-10-02 12:26:12 -07:00
2025-09-24 11:53:51 -07:00
2025-07-23 08:15:20 -07:00
2025-07-23 08:15:20 -07:00
2025-07-23 08:15:22 -07:00
2025-11-04 07:32:25 -08:00
2025-04-15 08:24:35 -07:00
2025-07-23 08:15:18 -07:00
2025-07-23 08:15:18 -07:00
2025-03-03 08:17:47 -08:00
2025-07-23 08:15:18 -07:00
2025-08-09 17:22:01 -07:00
2025-07-01 14:46:38 -07:00
2025-09-17 11:18:28 -07:00
2025-10-07 12:25:27 -07:00
2025-06-04 08:52:25 -07:00
2025-11-04 07:32:24 -08:00
2025-08-11 09:19:40 -07:00
2025-08-22 13:13:20 -07:00
2024-12-06 20:20:04 +09:00
2025-11-04 07:32:24 -08:00
2025-07-23 08:15:22 -07:00
2025-11-04 07:32:25 -08:00
2025-01-17 13:30:03 -08:00
2025-10-07 12:25:27 -07:00
2025-07-23 08:15:22 -07:00
2025-07-23 08:15:22 -07:00
2025-07-23 08:15:22 -07:00
2025-09-24 11:53:50 -07:00
2025-04-24 17:25:34 -07:00
2025-07-23 08:15:22 -07:00
2025-09-18 08:00:41 -07:00
2025-10-14 12:56:09 -07:00
2025-09-08 14:54:35 -07:00
2025-11-04 07:32:25 -08:00
2025-09-10 14:29:49 -07:00
2024-12-18 10:44:31 -08:00
2025-01-17 13:30:03 -08:00
2025-07-23 08:15:22 -07:00
2025-08-05 11:53:55 -07:00
2025-01-17 13:30:03 -08:00
2025-01-17 13:30:03 -08:00
2025-08-08 11:13:12 -07:00
2025-08-21 13:47:00 -07:00
2025-09-18 10:07:00 -07:00
2025-08-05 11:53:55 -07:00
2025-07-16 22:16:15 -07:00
2025-09-12 10:41:18 -07:00
2025-07-23 08:15:18 -07:00
2025-11-04 07:32:24 -08:00
2025-08-21 13:47:00 -07:00
2025-11-04 07:32:25 -08:00
2025-10-07 12:25:27 -07:00
2025-09-19 10:02:55 -07:00
2025-07-23 08:15:22 -07:00
2025-08-05 11:53:55 -07:00
2025-08-04 08:10:33 -07:00
2025-09-16 17:59:53 -07:00
2025-10-14 12:56:09 -07:00
2025-07-23 08:15:22 -07:00
2025-09-29 11:40:34 -07:00
2025-11-04 07:32:24 -08:00
2025-10-08 12:17:54 -07:00
2025-10-02 12:26:12 -07:00
2025-01-17 13:30:03 -08:00
2025-01-17 13:30:03 -08:00
2025-11-04 07:32:24 -08:00
2025-10-16 10:08:57 -07:00
2025-11-04 07:32:24 -08:00
2025-06-05 08:35:22 -07:00
2025-11-04 07:32:24 -08:00
2025-07-23 08:15:18 -07:00
2025-08-04 08:10:33 -07:00
2025-08-04 08:10:33 -07:00
2025-11-04 07:32:24 -08:00
2025-09-18 10:07:00 -07:00
2025-07-23 08:15:22 -07:00
2025-07-23 08:15:22 -07:00
2025-07-23 08:15:18 -07:00
2025-11-04 07:32:24 -08:00
2025-07-01 14:58:24 -07:00
2025-11-04 07:32:25 -08:00
2025-07-23 08:15:18 -07:00
2025-09-29 11:40:35 -07:00
2025-07-23 08:15:18 -07:00
2025-11-04 07:32:24 -08:00
2025-07-23 08:15:22 -07:00
2025-11-04 07:32:25 -08:00
2025-07-23 08:15:22 -07:00
2025-09-16 11:37:06 -07:00
2025-09-16 11:37:06 -07:00
2025-07-23 08:15:22 -07:00
2025-07-23 08:15:22 -07:00
2025-01-17 13:30:03 -08:00
2024-12-18 10:44:30 -08:00
2025-08-21 13:46:59 -07:00
2025-07-23 08:15:22 -07:00
2025-07-23 08:15:22 -07:00
2025-11-04 07:32:25 -08:00
2025-11-04 07:32:24 -08:00
2025-07-23 08:15:22 -07:00