Daniel Barkalow | 2d4177c | 2007-09-10 23:03:00 -0400 | [diff] [blame] | 1 | #ifndef FETCH_PACK_H |
| 2 | #define FETCH_PACK_H |
| 3 | |
Michael Haggerty | 8bee93d | 2012-09-09 08:19:40 +0200 | [diff] [blame] | 4 | #include "string-list.h" |
Junio C Hamano | 47a5918 | 2013-07-08 13:56:53 -0700 | [diff] [blame] | 5 | #include "run-command.h" |
Michael Haggerty | 8bee93d | 2012-09-09 08:19:40 +0200 | [diff] [blame] | 6 | |
Jonathan Nieder | 9cba13c | 2011-03-16 02:08:34 -0500 | [diff] [blame] | 7 | struct fetch_pack_args { |
Daniel Barkalow | 2d4177c | 2007-09-10 23:03:00 -0400 | [diff] [blame] | 8 | const char *uploadpack; |
Daniel Barkalow | 2d4177c | 2007-09-10 23:03:00 -0400 | [diff] [blame] | 9 | int unpacklimit; |
Daniel Barkalow | 2d4177c | 2007-09-10 23:03:00 -0400 | [diff] [blame] | 10 | int depth; |
Shawn O. Pearce | bbaf458 | 2007-09-18 04:55:00 -0400 | [diff] [blame] | 11 | unsigned quiet:1, |
| 12 | keep_pack:1, |
Shawn O. Pearce | fa74052 | 2007-09-19 00:49:35 -0400 | [diff] [blame] | 13 | lock_pack:1, |
Shawn O. Pearce | bbaf458 | 2007-09-18 04:55:00 -0400 | [diff] [blame] | 14 | use_thin_pack:1, |
| 15 | fetch_all:1, |
Ivan Todoroski | 078b895 | 2012-04-02 17:13:48 +0200 | [diff] [blame] | 16 | stdin_refs:1, |
Shawn O. Pearce | bbaf458 | 2007-09-18 04:55:00 -0400 | [diff] [blame] | 17 | verbose:1, |
Shawn O. Pearce | 348e390 | 2008-03-03 22:27:33 -0500 | [diff] [blame] | 18 | no_progress:1, |
Shawn O. Pearce | 249b200 | 2009-10-30 17:47:42 -0700 | [diff] [blame] | 19 | include_tag:1, |
Nguyễn Thái Ngọc Duy | c6807a4 | 2013-05-26 08:16:17 +0700 | [diff] [blame] | 20 | stateless_rpc:1, |
| 21 | check_self_contained_and_connected:1, |
| 22 | self_contained_and_connected:1; |
Daniel Barkalow | 2d4177c | 2007-09-10 23:03:00 -0400 | [diff] [blame] | 23 | }; |
| 24 | |
Michael Haggerty | 4ba1599 | 2012-09-09 08:19:43 +0200 | [diff] [blame] | 25 | /* |
Junio C Hamano | f2db854 | 2013-01-29 14:02:15 -0800 | [diff] [blame] | 26 | * sought represents remote references that should be updated from. |
| 27 | * On return, the names that were found on the remote will have been |
| 28 | * marked as such. |
Michael Haggerty | 4ba1599 | 2012-09-09 08:19:43 +0200 | [diff] [blame] | 29 | */ |
Shawn O. Pearce | fa74052 | 2007-09-19 00:49:35 -0400 | [diff] [blame] | 30 | struct ref *fetch_pack(struct fetch_pack_args *args, |
Michael Haggerty | 63c6945 | 2012-09-09 08:19:39 +0200 | [diff] [blame] | 31 | int fd[], struct child_process *conn, |
| 32 | const struct ref *ref, |
| 33 | const char *dest, |
Junio C Hamano | f2db854 | 2013-01-29 14:02:15 -0800 | [diff] [blame] | 34 | struct ref **sought, |
| 35 | int nr_sought, |
Michael Haggerty | 63c6945 | 2012-09-09 08:19:39 +0200 | [diff] [blame] | 36 | char **pack_lockfile); |
Daniel Barkalow | 2d4177c | 2007-09-10 23:03:00 -0400 | [diff] [blame] | 37 | |
| 38 | #endif |