send-pack.h 893 Bytes
Newer Older
1 2 3
#ifndef SEND_PACK_H
#define SEND_PACK_H

4 5
#include "string-list.h"

6 7 8 9
struct child_process;
struct oid_array;
struct ref;

10 11 12 13 14
/* Possible values for push_cert field in send_pack_args. */
#define SEND_PACK_PUSH_CERT_NEVER 0
#define SEND_PACK_PUSH_CERT_IF_ASKED 1
#define SEND_PACK_PUSH_CERT_ALWAYS 2

15
struct send_pack_args {
16
	const char *url;
17
	unsigned verbose:1,
18
		quiet:1,
19
		porcelain:1,
20
		progress:1,
21
		send_mirror:1,
22 23
		force_update:1,
		use_thin_pack:1,
24
		use_ofs_delta:1,
25
		dry_run:1,
26 27
		/* One of the SEND_PACK_PUSH_CERT_* constants. */
		push_cert:2,
28 29
		stateless_rpc:1,
		atomic:1;
30
	const struct string_list *push_options;
31 32
};

33 34 35 36
struct option;
int option_parse_push_signed(const struct option *opt,
			     const char *arg, int unset);

37
int send_pack(struct send_pack_args *args,
38
	      int fd[], struct child_process *conn,
39
	      struct ref *remote_refs, struct oid_array *extra_have);
40 41

#endif