aboutsummaryrefslogtreecommitdiffstats
path: root/promisor-remote.c
diff options
context:
space:
mode:
Diffstat (limited to 'promisor-remote.c')
-rw-r--r--promisor-remote.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/promisor-remote.c b/promisor-remote.c
index faa7612941..550a38f752 100644
--- a/promisor-remote.c
+++ b/promisor-remote.c
@@ -20,6 +20,16 @@ static int fetch_objects(struct repository *repo,
int i;
FILE *child_in;
+ /* TODO: This should use NO_LAZY_FETCH_ENVIRONMENT */
+ if (git_env_bool("GIT_NO_LAZY_FETCH", 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)