summaryrefslogtreecommitdiff
path: root/fetch-object.h
diff options
context:
space:
mode:
authorJonathan Tan <jonathantanmy@google.com>2018-09-12 15:47:37 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-09-13 20:56:19 (GMT)
commit8708ca09a67aeccab1d6852382cfd9267a8a395e (patch)
tree78eb4e662c0c0c5a571604ae360f355b48c3c043 /fetch-object.h
parent1d4361b0f344188ab5eec6dcea01f61a3a3a1670 (diff)
downloadgit-8708ca09a67aeccab1d6852382cfd9267a8a395e.zip
git-8708ca09a67aeccab1d6852382cfd9267a8a395e.tar.gz
git-8708ca09a67aeccab1d6852382cfd9267a8a395e.tar.bz2
fetch-object: unify fetch_object[s] functions
There are fetch_object() and fetch_objects() helpers in fetch-object.h; as the latter takes "struct oid_array", the former cannot be made into a thin wrapper around the latter without an extra allocation and set-up cost. Update fetch_objects() to take an array of "struct object_id" and number of elements in it as separate parameters, remove fetch_object(), and adjust all existing callers of these functions to use the new fetch_objects(). Signed-off-by: Jonathan Tan <jonathantanmy@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'fetch-object.h')
-rw-r--r--fetch-object.h8
1 files changed, 2 insertions, 6 deletions
diff --git a/fetch-object.h b/fetch-object.h
index 4b269d0..d2f996d 100644
--- a/fetch-object.h
+++ b/fetch-object.h
@@ -1,11 +1,7 @@
#ifndef FETCH_OBJECT_H
#define FETCH_OBJECT_H
-#include "sha1-array.h"
-
-extern void fetch_object(const char *remote_name, const unsigned char *sha1);
-
-extern void fetch_objects(const char *remote_name,
- const struct oid_array *to_fetch);
+void fetch_objects(const char *remote_name, const struct object_id *oids,
+ int oid_nr);
#endif