From 09f61306ecfdf0e532c58460d8d868d50021e7db Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Mon, 20 May 2024 07:14:36 +0200 Subject: Merging upstream version 1:2.45.1. Signed-off-by: Daniel Baumann --- promisor-remote.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'promisor-remote.c') diff --git a/promisor-remote.c b/promisor-remote.c index ac3aa1e..b414922 100644 --- a/promisor-remote.c +++ b/promisor-remote.c @@ -8,6 +8,7 @@ #include "transport.h" #include "strvec.h" #include "packfile.h" +#include "environment.h" struct promisor_remote_config { struct promisor_remote *promisors; @@ -23,6 +24,15 @@ static int fetch_objects(struct repository *repo, int i; FILE *child_in; + if (git_env_bool(NO_LAZY_FETCH_ENVIRONMENT, 0)) { + static int warning_shown; + if (!warning_shown) { + warning_shown = 1; + warning(_("lazy fetching disabled; some objects may not be available")); + } + return -1; + } + child.git_cmd = 1; child.in = -1; if (repo != the_repository) -- cgit v1.2.3