diff options
-rw-r--r-- | bdep/sync.cxx | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/bdep/sync.cxx b/bdep/sync.cxx index 25ed63e..b7e71fb 100644 --- a/bdep/sync.cxx +++ b/bdep/sync.cxx @@ -1638,13 +1638,18 @@ namespace bdep // Failed that it will be quite confusing since we may be re-fetching // the same repositories over and over. // - if (cfgs.size () != 1 && *fetch) + // Note: counter-intuitively, we may end up here even if fetch is + // nullopt; see load_implicit() for details. + // + bool deep_fetch (fetch && *fetch); + + if (cfgs.size () != 1 && deep_fetch) text << "fetching in configuration " << p.representation (); run_bpkg (bpkg_fetch_verb, co, "fetch", "-d", p, - (*fetch ? nullptr : "--shallow"), + (deep_fetch ? nullptr : "--shallow"), cfg.reps); } |