]>
Commit | Line | Data |
---|---|---|
2d4177c0 DB |
1 | #ifndef FETCH_PACK_H |
2 | #define FETCH_PACK_H | |
3 | ||
8bee93dd | 4 | #include "string-list.h" |
47a59185 | 5 | #include "run-command.h" |
685fbd32 | 6 | #include "protocol.h" |
640d8b72 | 7 | #include "list-objects-filter-options.h" |
8bee93dd | 8 | |
910650d2 | 9 | struct oid_array; |
beea4152 | 10 | |
9cba13ca | 11 | struct fetch_pack_args { |
2d4177c0 | 12 | const char *uploadpack; |
2d4177c0 | 13 | int unpacklimit; |
2d4177c0 | 14 | int depth; |
508ea882 | 15 | const char *deepen_since; |
a45a2600 | 16 | const struct string_list *deepen_not; |
640d8b72 | 17 | struct list_objects_filter_options filter_options; |
cccf74e2 | 18 | unsigned deepen_relative:1; |
f6486f07 NTND |
19 | unsigned quiet:1; |
20 | unsigned keep_pack:1; | |
21 | unsigned lock_pack:1; | |
22 | unsigned use_thin_pack:1; | |
23 | unsigned fetch_all:1; | |
24 | unsigned stdin_refs:1; | |
92251b1b | 25 | unsigned diag_url:1; |
f6486f07 NTND |
26 | unsigned verbose:1; |
27 | unsigned no_progress:1; | |
28 | unsigned include_tag:1; | |
29 | unsigned stateless_rpc:1; | |
30 | unsigned check_self_contained_and_connected:1; | |
31 | unsigned self_contained_and_connected:1; | |
beea4152 | 32 | unsigned cloning:1; |
48d25cae | 33 | unsigned update_shallow:1; |
79891cb9 | 34 | unsigned deepen:1; |
88e2f9ed JT |
35 | unsigned from_promisor:1; |
36 | ||
37 | /* | |
38 | * If 1, fetch_pack() will also not modify any object flags. | |
39 | * This allows fetch_pack() to safely be called by any function, | |
40 | * regardless of which object flags it uses (if any). | |
41 | */ | |
42 | unsigned no_dependents:1; | |
2d4177c0 DB |
43 | }; |
44 | ||
4ba15999 | 45 | /* |
f2db854d JH |
46 | * sought represents remote references that should be updated from. |
47 | * On return, the names that were found on the remote will have been | |
48 | * marked as such. | |
4ba15999 | 49 | */ |
fa740529 | 50 | struct ref *fetch_pack(struct fetch_pack_args *args, |
63c69453 MH |
51 | int fd[], struct child_process *conn, |
52 | const struct ref *ref, | |
53 | const char *dest, | |
f2db854d JH |
54 | struct ref **sought, |
55 | int nr_sought, | |
910650d2 | 56 | struct oid_array *shallow, |
685fbd32 BW |
57 | char **pack_lockfile, |
58 | enum protocol_version version); | |
2d4177c0 | 59 | |
e860d96b MM |
60 | /* |
61 | * Print an appropriate error message for each sought ref that wasn't | |
62 | * matched. Return 0 if all sought refs were matched, otherwise 1. | |
63 | */ | |
64 | int report_unmatched_refs(struct ref **sought, int nr_sought); | |
65 | ||
2d4177c0 | 66 | #endif |