]> git.ipfire.org Git - thirdparty/git.git/blobdiff - promisor-remote.c
Merge branch 'jt/t5500-unflake'
[thirdparty/git.git] / promisor-remote.c
index 9bd5b79d59446dede45ea075fc8d7307fcb98648..baaea12fd69b3b2c86f9fe5308a06c65e2eff3eb 100644 (file)
@@ -16,10 +16,8 @@ static int fetch_refs(const char *remote_name, struct ref *ref)
 {
        struct remote *remote;
        struct transport *transport;
-       int original_fetch_if_missing = fetch_if_missing;
        int res;
 
-       fetch_if_missing = 0;
        remote = remote_get(remote_name);
        if (!remote->url[0])
                die(_("Remote with no URL"));
@@ -28,7 +26,6 @@ static int fetch_refs(const char *remote_name, struct ref *ref)
        transport_set_option(transport, TRANS_OPT_FROM_PROMISOR, "1");
        transport_set_option(transport, TRANS_OPT_NO_DEPENDENTS, "1");
        res = transport_fetch_refs(transport, ref);
-       fetch_if_missing = original_fetch_if_missing;
 
        return res;
 }
@@ -104,7 +101,7 @@ static void promisor_remote_move_to_tail(struct promisor_remote *r,
 static int promisor_remote_config(const char *var, const char *value, void *data)
 {
        const char *name;
-       int namelen;
+       size_t namelen;
        const char *subkey;
 
        if (!strcmp(var, "core.partialclonefilter"))
@@ -244,6 +241,9 @@ int promisor_remote_get_direct(struct repository *repo,
        int to_free = 0;
        int res = -1;
 
+       if (oid_nr == 0)
+               return 0;
+
        promisor_remote_init();
 
        for (r = promisors; r; r = r->next) {