Merge branch 'gh/gpg-doc-markup-fix'
[git/debian.git] / promisor-remote.h
blobedc45ab0f5fdcd8c4145aa1c81eb3346f2eeeda9
1 #ifndef PROMISOR_REMOTE_H
2 #define PROMISOR_REMOTE_H
4 #include "repository.h"
6 struct object_id;
8 /*
9 * Promisor remote linked list
11 * Information in its fields come from remote.XXX config entries or
12 * from extensions.partialclone.
14 struct promisor_remote {
15 struct promisor_remote *next;
16 const char *partial_clone_filter;
17 const char name[FLEX_ARRAY];
20 void repo_promisor_remote_reinit(struct repository *r);
21 static inline void promisor_remote_reinit(void)
23 repo_promisor_remote_reinit(the_repository);
26 void promisor_remote_clear(struct promisor_remote_config *config);
28 struct promisor_remote *repo_promisor_remote_find(struct repository *r, const char *remote_name);
29 static inline struct promisor_remote *promisor_remote_find(const char *remote_name)
31 return repo_promisor_remote_find(the_repository, remote_name);
34 int repo_has_promisor_remote(struct repository *r);
35 static inline int has_promisor_remote(void)
37 return repo_has_promisor_remote(the_repository);
41 * Fetches all requested objects from all promisor remotes, trying them one at
42 * a time until all objects are fetched. Returns 0 upon success, and non-zero
43 * otherwise.
45 * If oid_nr is 0, this function returns 0 (success) immediately.
47 int promisor_remote_get_direct(struct repository *repo,
48 const struct object_id *oids,
49 int oid_nr);
51 #endif /* PROMISOR_REMOTE_H */