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