diff options
Diffstat (limited to 'promisor-remote.c')
-rw-r--r-- | promisor-remote.c | 28 |
1 files changed, 18 insertions, 10 deletions
diff --git a/promisor-remote.c b/promisor-remote.c index 68f46f5ec7..1adcd6fb0a 100644 --- a/promisor-remote.c +++ b/promisor-remote.c @@ -1,9 +1,13 @@ -#include "cache.h" +#include "git-compat-util.h" +#include "gettext.h" +#include "hex.h" #include "object-store.h" #include "promisor-remote.h" #include "config.h" +#include "trace2.h" #include "transport.h" #include "strvec.h" +#include "packfile.h" struct promisor_remote_config { struct promisor_remote *promisors; @@ -230,18 +234,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 +260,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; } |