summaryrefslogtreecommitdiffstats
path: root/contrib/persistent-https
diff options
context:
space:
mode:
authorChristian Couder <christian.couder@gmail.com>2026-02-16 14:23:13 +0100
committerJunio C Hamano <gitster@pobox.com>2026-02-17 11:46:41 -0800
commit257f2db5d3e6d734861890ed4f1d81607f1702fe (patch)
tree56e383bec3beb06c4be9b2482e43449c38ec71bd /contrib/persistent-https
parentcd1a89838ad6753830afeed4ad8319e567b6e43d (diff)
downloadgit-257f2db5d3e6d734861890ed4f1d81607f1702fe.tar.gz
git-257f2db5d3e6d734861890ed4f1d81607f1702fe.zip
promisor-remote: keep advertised filters in memory
Currently, advertised filters are only kept in memory temporarily during parsing, or persisted to disk if `promisor.storeFields` contains 'partialCloneFilter'. In a following commit though, we will add a `--filter=auto` option. This option will enable the client to use the filters that the server is suggesting for the promisor remotes the client accepts. To use them even if `promisor.storeFields` is not configured, these filters should be stored somewhere for the current session. Let's add an `advertised_filter` field to `struct promisor_remote` for that purpose. To ensure that the filters are available in all cases, filter_promisor_remote() captures them into a temporary list and applies them to the `promisor_remote` structs after the potential configuration reload. Then the accepted remotes are marked as `accepted` in the repository state. This ensures that subsequent calls to look up accepted remotes (like in the filter construction below) actually find them. In a following commit, we will add a `--filter=auto` option that will enable a client to use the filters suggested by the server for the promisor remotes the client accepted. To enable the client to construct a filter spec based on these filters, let's also add a `promisor_remote_construct_filter(repo)` function. This function: - iterates over all accepted promisor remotes in the repository, - collects the filters advertised for them (using `advertised_filter` added in this commit, and - generates a single filter spec for them. 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