Files
git-mirror/fetch-object-info.h
Calvin Wan 8c4368da08 transport: add client support for object-info
Sometimes it is useful to get information about an object without having
to download it completely. The server logic has already been implemented
in “a2ba162cda (object-info: support for retrieving object info,
2021-04-20)”.

Add client functions to communicate with the server.

The client currently supports requesting a list of object ids with
feature 'size' from a v2 server. If a server does not
advertise the feature, then the client falls back
to making the request through 'fetch'.

Helped-by: Jonathan Tan <jonathantanmy@google.com>
Helped-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Calvin Wan <calvinwan@google.com>
Signed-off-by: Eric Ju  <eric.peijian@gmail.com>
Signed-off-by: Taylor Blau <me@ttaylorr.com>
2024-10-31 16:59:58 -04:00

19 lines
503 B
C

#ifndef FETCH_OBJECT_INFO_H
#define FETCH_OBJECT_INFO_H
#include "pkt-line.h"
#include "protocol.h"
#include "object-store-ll.h"
struct object_info_args {
struct string_list *object_info_options;
const struct string_list *server_options;
struct oid_array *oids;
};
int fetch_object_info(enum protocol_version version, struct object_info_args *args,
struct packet_reader *reader, struct object_info *object_info_data,
int stateless_rpc, int fd_out);
#endif /* FETCH_OBJECT_INFO_H */