Use promisor_remote_get_direct() and has_promisor_remote()
Instead of using the repository_format_partial_clone global and fetch_objects() directly, let's use has_promisor_remote() and promisor_remote_get_direct(). This way all the configured promisor remotes will be taken into account, not only the one specified by extensions.partialClone. Also when cloning or fetching using a partial clone filter, remote.origin.promisor will be set to "true" instead of setting extensions.partialClone to "origin". This makes it possible to use many promisor remote just by fetching from them. Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
faf2abf496
commit
b14ed5adaf
@ -5,6 +5,7 @@
|
||||
#include "cache-tree.h"
|
||||
#include "object-store.h"
|
||||
#include "replace-object.h"
|
||||
#include "promisor-remote.h"
|
||||
|
||||
#ifndef DEBUG
|
||||
#define DEBUG 0
|
||||
@ -357,7 +358,7 @@ static int update_one(struct cache_tree *it,
|
||||
}
|
||||
|
||||
ce_missing_ok = mode == S_IFGITLINK || missing_ok ||
|
||||
(repository_format_partial_clone &&
|
||||
(has_promisor_remote() &&
|
||||
ce_skip_worktree(ce));
|
||||
if (is_null_oid(oid) ||
|
||||
(!ce_missing_ok && !has_object_file(oid))) {
|
||||
|
Reference in New Issue
Block a user