| Daniel Barkalow | 96249c0 | 2007-10-30 02:03:39 | [diff] [blame] | 1 | #ifndef SEND_PACK_H |
| 2 | #define SEND_PACK_H |
| 3 | |
| Stefan Beller | f6a4e61 | 2016-07-14 21:49:47 | [diff] [blame] | 4 | #include "string-list.h" |
| 5 | |
| Dave Borowitz | 3026109 | 2015-08-19 15:26:46 | [diff] [blame] | 6 | /* Possible values for push_cert field in send_pack_args. */ |
| 7 | #define SEND_PACK_PUSH_CERT_NEVER 0 |
| 8 | #define SEND_PACK_PUSH_CERT_IF_ASKED 1 |
| 9 | #define SEND_PACK_PUSH_CERT_ALWAYS 2 |
| 10 | |
| Daniel Barkalow | 96249c0 | 2007-10-30 02:03:39 | [diff] [blame] | 11 | struct send_pack_args { |
| Junio C Hamano | 9be8916 | 2014-08-23 01:15:24 | [diff] [blame] | 12 | const char *url; |
| Daniel Barkalow | 96249c0 | 2007-10-30 02:03:39 | [diff] [blame] | 13 | unsigned verbose:1, |
| Jeff King | 1207032 | 2009-08-05 20:22:36 | [diff] [blame] | 14 | quiet:1, |
| Larry D'Anna | 7755585 | 2010-02-27 04:52:15 | [diff] [blame] | 15 | porcelain:1, |
| Jeff King | d7c411b | 2010-10-16 18:37:03 | [diff] [blame] | 16 | progress:1, |
| Andy Whitcroft | 28b9d6e | 2007-11-09 23:32:10 | [diff] [blame] | 17 | send_mirror:1, |
| Daniel Barkalow | 96249c0 | 2007-10-30 02:03:39 | [diff] [blame] | 18 | force_update:1, |
| 19 | use_thin_pack:1, |
| Nicolas Pitre | b74fce1 | 2009-05-01 20:56:47 | [diff] [blame] | 20 | use_ofs_delta:1, |
| Shawn O. Pearce | de1a2fd | 2009-10-31 00:47:41 | [diff] [blame] | 21 | dry_run:1, |
| Dave Borowitz | 3026109 | 2015-08-19 15:26:46 | [diff] [blame] | 22 | /* One of the SEND_PACK_PUSH_CERT_* constants. */ |
| 23 | push_cert:2, |
| Ronnie Sahlberg | 4ff17f1 | 2015-01-08 03:23:22 | [diff] [blame] | 24 | stateless_rpc:1, |
| 25 | atomic:1; |
| Stefan Beller | f6a4e61 | 2016-07-14 21:49:47 | [diff] [blame] | 26 | const struct string_list *push_options; |
| Daniel Barkalow | 96249c0 | 2007-10-30 02:03:39 | [diff] [blame] | 27 | }; |
| 28 | |
| Dave Borowitz | 3026109 | 2015-08-19 15:26:46 | [diff] [blame] | 29 | struct option; |
| 30 | int option_parse_push_signed(const struct option *opt, |
| 31 | const char *arg, int unset); |
| 32 | |
| Daniel Barkalow | 96249c0 | 2007-10-30 02:03:39 | [diff] [blame] | 33 | int send_pack(struct send_pack_args *args, |
| Daniel Barkalow | 64fcef2 | 2009-03-09 01:06:07 | [diff] [blame] | 34 | int fd[], struct child_process *conn, |
| Nguyễn Thái Ngọc Duy | 13eb462 | 2013-12-05 13:02:29 | [diff] [blame] | 35 | struct ref *remote_refs, struct sha1_array *extra_have); |
| Daniel Barkalow | 96249c0 | 2007-10-30 02:03:39 | [diff] [blame] | 36 | |
| 37 | #endif |