Meet Soni
6eeb1c070a
builtin/for-each-ref: factor out core logic into a helper
...
The implementation of `git for-each-ref` is monolithic within
`cmd_for_each_ref()`, making it impossible to share its logic with other
commands. To enable code reuse for the upcoming `git refs list`
subcommand, refactor the core logic into a shared helper function.
Introduce a new `for-each-ref.h` header to define the public interface
for this shared logic. It contains the declaration for a new helper
function, `for_each_ref_core()`, and a macro for the common usage
options.
Move the option parsing, filtering, and formatting logic from
`cmd_for_each_ref()` into a new helper function named
`for_each_ref_core()`. This helper is made generic by accepting the
command's usage string as a parameter.
The original `cmd_for_each_ref()` is simplified to a thin wrapper that
is only responsible for defining its specific usage array and calling
the shared helper.
Mentored-by: Patrick Steinhardt <ps@pks.im >
Mentored-by: shejialuo <shejialuo@gmail.com >
Mentored-by: Karthik Nayak <karthik.188@gmail.com >
Signed-off-by: Meet Soni <meetsoni3017@gmail.com >
Signed-off-by: Junio C Hamano <gitster@pobox.com >
2025-08-05 09:11:54 -07:00
..
2025-08-04 08:10:33 -07:00
2025-07-23 08:15:20 -07:00
2024-10-25 14:02:36 -04:00
2025-07-01 14:58:24 -07:00
2024-10-11 09:37:18 -07:00
2025-07-01 14:46:38 -07:00
2024-12-06 20:20:02 +09:00
2025-08-04 08:10:33 -07:00
2025-07-23 08:15:21 -07:00
2025-04-15 08:24:35 -07:00
2024-12-13 07:33:36 -08:00
2025-07-23 08:15: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-08-04 08:10:33 -07:00
2025-07-23 08:15:22 -07:00
2025-07-23 08:15:21 -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-08-04 08:10:33 -07:00
2025-07-23 08:15:21 -07:00
2025-07-23 08:15:22 -07:00
2025-07-23 08:15:20 -07:00
2024-11-01 12:53:19 -04:00
2025-07-23 08:15:20 -07:00
2025-07-23 08:15:22 -07:00
2025-07-23 08:15:18 -07: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-07-23 08:15:18 -07:00
2025-07-01 14:46:38 -07:00
2025-08-04 08:10:33 -07:00
2025-08-04 08:10:33 -07:00
2025-06-04 08:52:25 -07:00
2025-07-23 08:15:20 -07:00
2025-07-23 08:15:18 -07:00
2025-08-05 09:11:54 -07:00
2024-12-06 20:20:04 +09:00
2025-07-23 08:15:18 -07:00
2025-07-23 08:15:22 -07:00
2025-08-04 08:10:33 -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-07-23 08:15:22 -07:00
2025-07-23 08:15:22 -07:00
2025-07-23 08:15:18 -07:00
2025-04-24 17:25:34 -07:00
2025-07-23 08:15:22 -07:00
2025-08-04 08:10:33 -07:00
2025-07-23 08:15:22 -07:00
2025-07-01 14:58:24 -07:00
2025-07-23 08:15:22 -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-07-23 08:15:18 -07:00
2025-01-17 13:30:03 -08:00
2025-01-17 13:30:03 -08:00
2025-04-08 13:59:11 -07:00
2025-07-23 08:15:22 -07:00
2025-07-23 08:15:18 -07:00
2025-07-23 08:15:18 -07:00
2025-07-01 14:46:37 -07:00
2025-07-23 08:15:22 -07:00
2025-07-23 08:15:18 -07:00
2025-07-23 08:15:18 -07:00
2025-07-23 08:15:19 -07:00
2025-08-04 08:10:33 -07:00
2025-07-15 15:18:18 -07:00
2025-07-23 08:15:22 -07:00
2025-07-23 08:15:22 -07:00
2024-09-13 14:33:30 -07:00
2025-07-15 15:18:18 -07:00
2025-08-04 08:10:33 -07:00
2025-07-23 08:15:18 -07:00
2025-07-23 08:15:18 -07:00
2025-07-23 08:15:22 -07:00
2025-08-04 08:10:33 -07:00
2025-07-23 08:15:18 -07:00
2025-08-04 08:10:33 -07:00
2025-07-23 08:15:18 -07:00
2025-01-17 13:30:03 -08:00
2025-01-17 13:30:03 -08:00
2025-08-04 08:10:33 -07:00
2025-08-04 08:10:33 -07:00
2025-07-23 08:15:22 -07:00
2025-06-05 08:35:22 -07: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-07-23 08:15:18 -07:00
2025-04-24 17:25:34 -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-07-23 08:15:18 -07:00
2025-07-01 14:58:24 -07:00
2025-07-23 08:15:22 -07:00
2025-07-23 08:15:18 -07:00
2025-08-04 08:10:33 -07:00
2025-07-23 08:15:18 -07:00
2025-07-23 08:15:21 -07:00
2025-07-23 08:15:22 -07:00
2025-07-23 08:15:18 -07:00
2025-07-23 08:15:22 -07:00
2025-07-23 08:15: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
2024-12-18 10:44:30 -08: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-07-23 08:15:22 -07:00
2025-07-23 08:15:21 -07:00
2025-07-23 08:15:22 -07:00