summaryrefslogtreecommitdiffstats
path: root/promisor-remote.c
diff options
context:
space:
mode:
authorJonathan Tan <jonathantanmy@google.com>2022-10-04 23:13:40 +0200
committerJunio C Hamano <gitster@pobox.com>2022-10-05 20:06:52 +0200
commit00057bf14c9269cb26a6b8ba7e8bc9ecd634d22c (patch)
treed7a430a618aa3cc4a1d6a66f92e1f897c4a954b2 /promisor-remote.c
parentMerge a handful of topics from the 'master' front (diff)
downloadgit-00057bf14c9269cb26a6b8ba7e8bc9ecd634d22c.tar.xz
git-00057bf14c9269cb26a6b8ba7e8bc9ecd634d22c.zip
promisor-remote: remove a return value
No caller of promisor_remote_get_direct() is checking its return value, so remove it. Not checking the return value means that the user would not know whether the failure of reading an object is due to the promisor remote not supplying the object or because of local repository corruption, but this will be fixed in a subsequent patch. Signed-off-by: Jonathan Tan <jonathantanmy@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'promisor-remote.c')
-rw-r--r--promisor-remote.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/promisor-remote.c b/promisor-remote.c
index 68f46f5ec7..8b4d650b4c 100644
--- a/promisor-remote.c
+++ b/promisor-remote.c
@@ -230,18 +230,17 @@ 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;
if (oid_nr == 0)
- return 0;
+ return;
promisor_remote_init(repo);
@@ -256,12 +255,9 @@ int promisor_remote_get_direct(struct repository *repo,
continue;
}
}
- res = 0;
break;
}
if (to_free)
free(remaining_oids);
-
- return res;
}