aboutsummaryrefslogtreecommitdiff
path: root/promisor-remote.h
diff options
context:
space:
mode:
Diffstat (limited to 'promisor-remote.h')
-rw-r--r--promisor-remote.h17
1 files changed, 12 insertions, 5 deletions
diff --git a/promisor-remote.h b/promisor-remote.h
index 263d331a55..3d4d2de018 100644
--- a/promisor-remote.h
+++ b/promisor-remote.h
@@ -15,6 +15,7 @@ struct object_id;
struct promisor_remote {
struct promisor_remote *next;
char *partial_clone_filter;
+ char *advertised_filter;
unsigned int accepted : 1;
const char name[FLEX_ARRAY];
};
@@ -48,12 +49,12 @@ char *promisor_remote_info(struct repository *repo);
/*
* Prepare a reply to a "promisor-remote" advertisement from a server.
* Check the value of "promisor.acceptfromserver" and maybe the
- * configured promisor remotes, if any, to prepare the reply.
- * Return value is NULL if no promisor remote from the server
- * is accepted. Otherwise it contains the names of the accepted promisor
- * remotes separated by ';'. See gitprotocol-v2(5).
+ * configured promisor remotes, if any, to prepare the reply. If the
+ * `accepted_out` argument is not NULL, it is set to either NULL or to
+ * the names of the accepted promisor remotes separated by ';' if
+ * any. See gitprotocol-v2(5).
*/
-char *promisor_remote_reply(const char *info);
+void promisor_remote_reply(const char *info, char **accepted_out);
/*
* Set the 'accepted' flag for some promisor remotes. Useful on the
@@ -67,4 +68,10 @@ void mark_promisor_remotes_as_accepted(struct repository *repo, const char *remo
*/
int repo_has_accepted_promisor_remote(struct repository *r);
+/*
+ * Use the filters from the accepted remotes to create a combined
+ * filter (useful in `--filter=auto` mode).
+ */
+char *promisor_remote_construct_filter(struct repository *repo);
+
#endif /* PROMISOR_REMOTE_H */