1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-05-04 20:36:15 +02:00
git/promisor-remote.h
Jonathan Tan 625e7f148e promisor-remote: remove unused variable
The variable core_partial_clone_filter_default has been unused since
fa3d1b63e8 ("promisor-remote: parse remote.*.partialclonefilter",
2019-06-25), when Git was changed to refer to
remote.*.partialclonefilter as the default filter when fetching in a
partial clone, but (perhaps inadvertently) there was no fallback to
core.partialclonefilter.

One alternative is to add the fallback, but the aforementioned change
was made more than a year ago and I have not heard of any complaints
regarding this matter. In addition, there is currently no mention of
core.partialclonefilter in the user documentation. So it seems best to
reaffirm that Git will only support remote.*.partialclonefilter.

Signed-off-by: Jonathan Tan <jonathantanmy@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2020-09-21 22:32:49 -07:00

42 lines
1.1 KiB
C

#ifndef PROMISOR_REMOTE_H
#define PROMISOR_REMOTE_H
#include "repository.h"
struct object_id;
/*
* Promisor remote linked list
*
* Information in its fields come from remote.XXX config entries or
* from extensions.partialclone.
*/
struct promisor_remote {
struct promisor_remote *next;
const char *partial_clone_filter;
const char name[FLEX_ARRAY];
};
void promisor_remote_reinit(void);
struct promisor_remote *promisor_remote_find(const char *remote_name);
int has_promisor_remote(void);
/*
* Fetches all requested objects from all promisor remotes, trying them one at
* a time until all objects are fetched. Returns 0 upon success, and non-zero
* otherwise.
*
* If oid_nr is 0, this function returns 0 (success) immediately.
*/
int promisor_remote_get_direct(struct repository *repo,
const struct object_id *oids,
int oid_nr);
/*
* This should be used only once from setup.c to set the value we got
* from the extensions.partialclone config option.
*/
void set_repository_format_partial_clone(char *partial_clone);
#endif /* PROMISOR_REMOTE_H */