diff options
| author | Christian Couder <christian.couder@gmail.com> | 2026-04-07 13:52:41 +0200 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2026-04-07 08:45:44 -0700 |
| commit | e0f80d8876960442dd2645215c4fe5e1b1d80fc3 (patch) | |
| tree | 2f624e9131c6cec30da4391e1d4413a40f7b4b19 /contrib/persistent-https | |
| parent | 7557a562434804d27f1417fe94c4081e2ee7e68b (diff) | |
| download | git-e0f80d8876960442dd2645215c4fe5e1b1d80fc3.tar.gz git-e0f80d8876960442dd2645215c4fe5e1b1d80fc3.zip | |
promisor-remote: keep accepted promisor_info structs alive
In filter_promisor_remote(), the instances of `struct promisor_info`
for accepted remotes are dismantled into separate parallel data
structures (the 'accepted' strvec for server names, and
'accepted_filters' for filter strings) and then immediately freed.
Instead, let's keep these instances on an 'accepted_remotes' list.
This way the post-loop phase can iterate a single list to build the
protocol reply, apply advertised filters, and mark remotes as
accepted, rather than iterating three separate structures.
This refactoring also prepares for a future commit that will add a
'local_name' member to 'struct promisor_info'. Since struct instances
stay alive, downstream code will be able to simply read both names
from them rather than needing yet another parallel strvec.
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'contrib/persistent-https')
0 files changed, 0 insertions, 0 deletions
