]> git.ipfire.org Git - thirdparty/git.git/blame_incremental - promisor-remote.h
Merge branch 'ab/pager-exit-log'
[thirdparty/git.git] / promisor-remote.h
... / ...
CommitLineData
1#ifndef PROMISOR_REMOTE_H
2#define PROMISOR_REMOTE_H
3
4#include "repository.h"
5
6struct object_id;
7
8/*
9 * Promisor remote linked list
10 *
11 * Information in its fields come from remote.XXX config entries or
12 * from extensions.partialclone.
13 */
14struct promisor_remote {
15 struct promisor_remote *next;
16 const char *partial_clone_filter;
17 const char name[FLEX_ARRAY];
18};
19
20void promisor_remote_reinit(void);
21struct promisor_remote *promisor_remote_find(const char *remote_name);
22int has_promisor_remote(void);
23
24/*
25 * Fetches all requested objects from all promisor remotes, trying them one at
26 * a time until all objects are fetched. Returns 0 upon success, and non-zero
27 * otherwise.
28 *
29 * If oid_nr is 0, this function returns 0 (success) immediately.
30 */
31int promisor_remote_get_direct(struct repository *repo,
32 const struct object_id *oids,
33 int oid_nr);
34
35/*
36 * This should be used only once from setup.c to set the value we got
37 * from the extensions.partialclone config option.
38 */
39void set_repository_format_partial_clone(char *partial_clone);
40
41#endif /* PROMISOR_REMOTE_H */