summaryrefslogtreecommitdiff
path: root/builtin/fetch.c
diff options
context:
space:
mode:
Diffstat (limited to 'builtin/fetch.c')
-rw-r--r--builtin/fetch.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/builtin/fetch.c b/builtin/fetch.c
index 1ce16c9..ab7e4b1 100644
--- a/builtin/fetch.c
+++ b/builtin/fetch.c
@@ -906,8 +906,17 @@ static int store_updated_refs(const char *raw_url, const char *remote_name,
url = xstrdup("foreign");
if (!connectivity_checked) {
+ struct check_connected_options opt = CHECK_CONNECTED_INIT;
+
+ if (filter_options.choice)
+ /*
+ * Since a filter is specified, objects indirectly
+ * referenced by refs are allowed to be absent.
+ */
+ opt.check_refs_are_promisor_objects_only = 1;
+
rm = ref_map;
- if (check_connected(iterate_ref_map, &rm, NULL)) {
+ if (check_connected(iterate_ref_map, &rm, &opt)) {
rc = error(_("%s did not send all necessary objects\n"), url);
goto abort;
}