Merge branch 'cc/multi-promisor'
Cleanup. * cc/multi-promisor: promisor-remote: skip move_to_tail when no-op promisor-remote.h: drop extern from function declaration
This commit is contained in:
commit
59b19bcd9f
@ -89,6 +89,9 @@ static struct promisor_remote *promisor_remote_lookup(const char *remote_name,
|
||||
static void promisor_remote_move_to_tail(struct promisor_remote *r,
|
||||
struct promisor_remote *previous)
|
||||
{
|
||||
if (r->next == NULL)
|
||||
return;
|
||||
|
||||
if (previous)
|
||||
previous->next = r->next;
|
||||
else
|
||||
|
@ -15,17 +15,17 @@ struct promisor_remote {
|
||||
const char name[FLEX_ARRAY];
|
||||
};
|
||||
|
||||
extern void promisor_remote_reinit(void);
|
||||
extern struct promisor_remote *promisor_remote_find(const char *remote_name);
|
||||
extern int has_promisor_remote(void);
|
||||
extern int promisor_remote_get_direct(struct repository *repo,
|
||||
const struct object_id *oids,
|
||||
int oid_nr);
|
||||
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);
|
||||
|
||||
/*
|
||||
* This should be used only once from setup.c to set the value we got
|
||||
* from the extensions.partialclone config option.
|
||||
*/
|
||||
extern void set_repository_format_partial_clone(char *partial_clone);
|
||||
void set_repository_format_partial_clone(char *partial_clone);
|
||||
|
||||
#endif /* PROMISOR_REMOTE_H */
|
||||
|
@ -429,6 +429,19 @@ test_expect_success 'rev-list dies for missing objects on cmd line' '
|
||||
done
|
||||
'
|
||||
|
||||
test_expect_success 'single promisor remote can be re-initialized gracefully' '
|
||||
# ensure one promisor is in the promisors list
|
||||
rm -rf repo &&
|
||||
test_create_repo repo &&
|
||||
test_create_repo other &&
|
||||
git -C repo remote add foo "file://$(pwd)/other" &&
|
||||
git -C repo config remote.foo.promisor true &&
|
||||
git -C repo config extensions.partialclone foo &&
|
||||
|
||||
# reinitialize the promisors list
|
||||
git -C repo fetch --filter=blob:none foo
|
||||
'
|
||||
|
||||
test_expect_success 'gc repacks promisor objects separately from non-promisor objects' '
|
||||
rm -rf repo &&
|
||||
test_create_repo repo &&
|
||||
|
Loading…
Reference in New Issue
Block a user