2019-06-25 21:40:27 +08:00
|
|
|
#ifndef PROMISOR_REMOTE_H
|
|
|
|
#define PROMISOR_REMOTE_H
|
|
|
|
|
2019-09-25 16:20:56 +08:00
|
|
|
#include "repository.h"
|
|
|
|
|
2019-06-25 21:40:28 +08:00
|
|
|
struct object_id;
|
|
|
|
|
2019-06-25 21:40:27 +08:00
|
|
|
/*
|
|
|
|
* Promisor remote linked list
|
2019-06-25 21:40:32 +08:00
|
|
|
*
|
|
|
|
* Information in its fields come from remote.XXX config entries or
|
|
|
|
* from extensions.partialclone or core.partialclonefilter.
|
2019-06-25 21:40:27 +08:00
|
|
|
*/
|
|
|
|
struct promisor_remote {
|
|
|
|
struct promisor_remote *next;
|
2019-06-25 21:40:32 +08:00
|
|
|
const char *partial_clone_filter;
|
2019-06-25 21:40:27 +08:00
|
|
|
const char name[FLEX_ARRAY];
|
|
|
|
};
|
|
|
|
|
2019-09-21 08:03:48 +08:00
|
|
|
void promisor_remote_reinit(void);
|
|
|
|
struct promisor_remote *promisor_remote_find(const char *remote_name);
|
|
|
|
int has_promisor_remote(void);
|
|
|
|
int promisor_remote_get_direct(struct repository *repo,
|
|
|
|
const struct object_id *oids,
|
|
|
|
int oid_nr);
|
2019-06-25 21:40:27 +08:00
|
|
|
|
2019-06-25 21:40:38 +08:00
|
|
|
/*
|
|
|
|
* This should be used only once from setup.c to set the value we got
|
|
|
|
* from the extensions.partialclone config option.
|
|
|
|
*/
|
2019-09-21 08:03:48 +08:00
|
|
|
void set_repository_format_partial_clone(char *partial_clone);
|
2019-06-25 21:40:38 +08:00
|
|
|
|
2019-06-25 21:40:27 +08:00
|
|
|
#endif /* PROMISOR_REMOTE_H */
|