diff options
author | Toon Claes <toon@iotcl.com> | 2025-02-06 07:33:31 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2025-02-06 12:23:53 -0800 |
commit | 879780f9a15177ed703f56bf347e0a410c22e9d1 (patch) | |
tree | 47c8c178770db32db8158c5c2a2657a4e643a737 /commit.c | |
parent | bc26f7690a318fd0a875bfd8d56c70e1ccb79ccb (diff) |
clone: refactor wanted_peer_refs()
The function wanted_peer_refs() is used to map the refs returned by the
server to refs we will save in our clone.
Over time this function grown to be very complex. Refactor it.
Previously, there was a separate code path for when
`option_single_branch` was set. It resulted in duplicated code and
deeper nested conditions. After this refactor the code path for when
`option_single_branch` is truthy modifies `refs` and then falls through
to the common code path. This approach relies on the `refspec` being set
correctly and thus only mapping refs that are relevant.
Signed-off-by: Toon Claes <toon@iotcl.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'commit.c')
0 files changed, 0 insertions, 0 deletions