]>
git.ipfire.org Git - thirdparty/git.git/blob - send-pack.h
c5ded2d2006f13c80d1fb097173f5a6a89606630
4 #include "string-list.h"
11 /* Possible values for push_cert field in send_pack_args. */
12 #define SEND_PACK_PUSH_CERT_NEVER 0
13 #define SEND_PACK_PUSH_CERT_IF_ASKED 1
14 #define SEND_PACK_PUSH_CERT_ALWAYS 2
16 /* At least one reference has been rejected by the remote side. */
17 #define ERROR_SEND_PACK_BAD_REF_STATUS 1
19 struct send_pack_args
{
30 /* One of the SEND_PACK_PUSH_CERT_* constants. */
35 const struct string_list
*push_options
;
39 int option_parse_push_signed(const struct option
*opt
,
40 const char *arg
, int unset
);
43 * Compute a packfile and write it to a file descriptor. The `fd` array needs
44 * to contain two file descriptors: `fd[0]` is the file descriptor used as
45 * input for the packet reader, whereas `fd[1]` is the file descriptor the
46 * packfile will be written to.
48 * Returns 0 on success, non-zero otherwise. Negative return values indicate a
49 * generic error, whereas positive return values indicate specific error
50 * conditions as documented with the `ERROR_SEND_PACK_*` constants.
52 int send_pack(struct repository
*r
, struct send_pack_args
*args
,
53 int fd
[], struct child_process
*conn
,
54 struct ref
*remote_refs
, struct oid_array
*extra_have
);