Daniel Barkalow | 96249c0 | 2007-10-29 22:03:39 -0400 | [diff] [blame] | 1 | #ifndef SEND_PACK_H |
| 2 | #define SEND_PACK_H |
| 3 | |
Stefan Beller | f6a4e61 | 2016-07-14 14:49:47 -0700 | [diff] [blame] | 4 | #include "string-list.h" |
| 5 | |
Dave Borowitz | 3026109 | 2015-08-19 11:26:46 -0400 | [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-29 22:03:39 -0400 | [diff] [blame] | 11 | struct send_pack_args { |
Junio C Hamano | 9be8916 | 2014-08-22 18:15:24 -0700 | [diff] [blame] | 12 | const char *url; |
Daniel Barkalow | 96249c0 | 2007-10-29 22:03:39 -0400 | [diff] [blame] | 13 | unsigned verbose:1, |
Jeff King | 1207032 | 2009-08-05 16:22:36 -0400 | [diff] [blame] | 14 | quiet:1, |
Larry D'Anna | 7755585 | 2010-02-26 23:52:15 -0500 | [diff] [blame] | 15 | porcelain:1, |
Jeff King | d7c411b | 2010-10-17 02:37:03 +0800 | [diff] [blame] | 16 | progress:1, |
Andy Whitcroft | 28b9d6e | 2007-11-09 23:32:10 +0000 | [diff] [blame] | 17 | send_mirror:1, |
Daniel Barkalow | 96249c0 | 2007-10-29 22:03:39 -0400 | [diff] [blame] | 18 | force_update:1, |
| 19 | use_thin_pack:1, |
Nicolas Pitre | b74fce1 | 2009-05-01 16:56:47 -0400 | [diff] [blame] | 20 | use_ofs_delta:1, |
Shawn O. Pearce | de1a2fd | 2009-10-30 17:47:41 -0700 | [diff] [blame] | 21 | dry_run:1, |
Dave Borowitz | 3026109 | 2015-08-19 11:26:46 -0400 | [diff] [blame] | 22 | /* One of the SEND_PACK_PUSH_CERT_* constants. */ |
| 23 | push_cert:2, |
Ronnie Sahlberg | 4ff17f1 | 2015-01-07 19:23:22 -0800 | [diff] [blame] | 24 | stateless_rpc:1, |
| 25 | atomic:1; |
Stefan Beller | f6a4e61 | 2016-07-14 14:49:47 -0700 | [diff] [blame] | 26 | const struct string_list *push_options; |
Daniel Barkalow | 96249c0 | 2007-10-29 22:03:39 -0400 | [diff] [blame] | 27 | }; |
| 28 | |
Dave Borowitz | 3026109 | 2015-08-19 11:26:46 -0400 | [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-29 22:03:39 -0400 | [diff] [blame] | 33 | int send_pack(struct send_pack_args *args, |
Daniel Barkalow | 64fcef2 | 2009-03-08 21:06:07 -0400 | [diff] [blame] | 34 | int fd[], struct child_process *conn, |
brian m. carlson | 910650d | 2017-03-31 01:40:00 +0000 | [diff] [blame] | 35 | struct ref *remote_refs, struct oid_array *extra_have); |
Daniel Barkalow | 96249c0 | 2007-10-29 22:03:39 -0400 | [diff] [blame] | 36 | |
| 37 | #endif |