interplane.Get Omega
Read in your language

git

[Ported from github.com/git/git] Sync with Git 2.56.1

Brought by drakestapleton

branch master Branches Tags History

git / fetch-object-info.h

40 lines · 1186 bytes Raw Blame History
1#ifndef FETCH_OBJECT_INFO_H
2#define FETCH_OBJECT_INFO_H
3
4#include "object.h"
5#include "pkt-line.h"
6#include "protocol.h"
7
8struct fetch_object_info_results {
9 size_t *sizes;
10 enum object_type *types;
11 uint8_t *unrecognized;
12 size_t nr;
13 unsigned wants_size:1;
14 unsigned wants_type:1;
15};
16
17#define FETCH_OBJECT_INFO_RESULTS_INIT { 0 }
18
19struct oid_array;
20/*
21 * Sends git-cat-file object-info command into the request buf and reads the
22 * results from packets.
23 *
24 * The caller sets the wants_* flags in "results" to indicate which attributes
25 * it is interested in. On return, "results" holds one array per attribute that
26 * the server both advertised and answered with. An array left NULL means the
27 * attribute is not available.
28 * Release them with free_fetch_object_info_results().
29 */
30void fetch_object_info(enum protocol_version version,
31 const struct string_list *server_options,
32 const struct oid_array *oids,
33 struct packet_reader *reader,
34 struct fetch_object_info_results *results,
35 int stateless_rpc,
36 int fd_out);
37
38void free_fetch_object_info_results(struct fetch_object_info_results *results);
39
40#endif /* FETCH_OBJECT_INFO_H */