Browse Source
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>maint


4 changed files with 9 additions and 19 deletions
@ -1,11 +1,7 @@
@@ -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 |
||||
|
Loading…
Reference in new issue