]> git.ipfire.org Git - thirdparty/git.git/blobdiff - promisor-remote.c
object-file: remove OBJECT_INFO_IGNORE_LOOSE
[thirdparty/git.git] / promisor-remote.c
index 68f46f5ec70b93b28fa7c75988d671a4046e8fee..faa7612941cc2a70bf24f9dff2c02f2c5a2c0428 100644 (file)
@@ -4,6 +4,7 @@
 #include "config.h"
 #include "transport.h"
 #include "strvec.h"
+#include "packfile.h"
 
 struct promisor_remote_config {
        struct promisor_remote *promisors;
@@ -230,18 +231,18 @@ static int remove_fetched_oids(struct repository *repo,
        return remaining_nr;
 }
 
-int promisor_remote_get_direct(struct repository *repo,
-                              const struct object_id *oids,
-                              int oid_nr)
+void promisor_remote_get_direct(struct repository *repo,
+                               const struct object_id *oids,
+                               int oid_nr)
 {
        struct promisor_remote *r;
        struct object_id *remaining_oids = (struct object_id *)oids;
        int remaining_nr = oid_nr;
        int to_free = 0;
-       int res = -1;
+       int i;
 
        if (oid_nr == 0)
-               return 0;
+               return;
 
        promisor_remote_init(repo);
 
@@ -256,12 +257,16 @@ int promisor_remote_get_direct(struct repository *repo,
                                continue;
                        }
                }
-               res = 0;
-               break;
+               goto all_fetched;
        }
 
+       for (i = 0; i < remaining_nr; i++) {
+               if (is_promisor_object(&remaining_oids[i]))
+                       die(_("could not fetch %s from promisor remote"),
+                           oid_to_hex(&remaining_oids[i]));
+       }
+
+all_fetched:
        if (to_free)
                free(remaining_oids);
-
-       return res;
 }