]> Kevux Git Server - rit/commit
remote: move remote group resolution to remote.c
authorUsman Akinyemi <usmanakinyemi202@gmail.com>
Sun, 3 May 2026 15:34:01 +0000 (21:04 +0530)
committerJunio C Hamano <gitster@pobox.com>
Mon, 4 May 2026 01:11:17 +0000 (10:11 +0900)
commit3e7b9dce27b1519f6745c89fe01f0b840acddb0a
tree6cb9e47342376c3bdf11990363e50bd82ce60823
parent6ab1b3b74d02151e7570b82554e9cadebe0ea6b8
remote: move remote group resolution to remote.c

`get_remote_group`, `add_remote_or_group`, and the `remote_group_data`
struct are currently defined as static helpers inside builtin/fetch.c.
They implement generic remote group resolution that is not specific to
fetch — they parse `remotes.<name>` config entries and resolve a name
to either a list of group members or a single configured remote.

Move them to remote.c and declare them in remote.h so that other
builtins can use the same logic without duplication.

Useful for the next patch.

Suggested-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Usman Akinyemi <usmanakinyemi202@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/fetch.c
remote.c
remote.h