@@ -25,7 +25,7 @@
#include "packfile.h"
#include "parse-options.h"
#include "help.h"
-#include "fetch-object.h"
+#include "promisor-remote.h"
#ifdef NO_FAST_WORKING_DIRECTORY
#define FAST_WORKING_DIRECTORY 0
@@ -6490,8 +6490,7 @@ static void add_if_missing(struct repository *r,
void diffcore_std(struct diff_options *options)
{
- if (options->repo == the_repository &&
- repository_format_partial_clone) {
+ if (options->repo == the_repository && has_promisor_remote()) {
/*
* Prefetch the diff pairs that are about to be flushed.
*/
@@ -6508,8 +6507,7 @@ void diffcore_std(struct diff_options *options)
/*
* NEEDSWORK: Consider deduplicating the OIDs sent.
*/
- fetch_objects(repository_format_partial_clone,
- to_fetch.oid, to_fetch.nr);
+ promisor_remote_get_direct(to_fetch.oid, to_fetch.nr);
oid_array_clear(&to_fetch);
}
The repository_format_partial_clone global and fetch_objects() should not be used anymore when there can be more than one promisor remote. Instead let's use has_promisor_remote() and promisor_remote_get_direct() from "promisor-remote.h". This way all the configured promisor remotes will be taken into account, not only the one specified by extensions.partialClone. Signed-off-by: Christian Couder <chriscool@tuxfamily.org> --- diff.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-)