aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bpkg/rep-fetch.cxx8
1 files changed, 8 insertions, 0 deletions
diff --git a/bpkg/rep-fetch.cxx b/bpkg/rep-fetch.cxx
index abc43fc..77ffc10 100644
--- a/bpkg/rep-fetch.cxx
+++ b/bpkg/rep-fetch.cxx
@@ -373,6 +373,7 @@ namespace bpkg
// fragment list.
//
rep_fetch_data r;
+ size_t np (0);
for (git_fragment& gf: git_fetch (co, rl, td))
{
@@ -420,6 +421,8 @@ namespace bpkg
ignore_unknown,
rl,
fr.friendly_name);
+ np += fr.packages.size ();
+
r.fragments.push_back (move (fr));
}
@@ -435,6 +438,11 @@ namespace bpkg
filesystem_state_changed = true;
}
+ if (np == 0 && !rl.url ().fragment)
+ warn << "repository " << rl << " has no available packages" <<
+ info << "consider specifying explicit URL fragment (for example, "
+ << "#master)";
+
return r;
}