4 #include "string-list.h"
5 #include "run-command.h"
7 #include "list-objects-filter-options.h"
11 struct fetch_pack_args
{
12 const char *uploadpack
;
15 const char *deepen_since
;
16 const struct string_list
*deepen_not
;
17 struct list_objects_filter_options filter_options
;
18 const struct string_list
*server_options
;
21 * If not NULL, during packfile negotiation, fetch-pack will send "have"
22 * lines only with these tips and their ancestors.
24 const struct oid_array
*negotiation_tips
;
26 unsigned deepen_relative
:1;
30 unsigned use_thin_pack
:1;
32 unsigned stdin_refs
:1;
35 unsigned no_progress
:1;
36 unsigned include_tag
:1;
37 unsigned stateless_rpc
:1;
38 unsigned check_self_contained_and_connected
:1;
39 unsigned self_contained_and_connected
:1;
41 unsigned update_shallow
:1;
43 unsigned from_promisor
:1;
46 * If 1, fetch_pack() will also not modify any object flags.
47 * This allows fetch_pack() to safely be called by any function,
48 * regardless of which object flags it uses (if any).
50 unsigned no_dependents
:1;
54 * sought represents remote references that should be updated from.
55 * On return, the names that were found on the remote will have been
58 struct ref
*fetch_pack(struct fetch_pack_args
*args
,
59 int fd
[], struct child_process
*conn
,
60 const struct ref
*ref
,
64 struct oid_array
*shallow
,
66 enum protocol_version version
);
69 * Print an appropriate error message for each sought ref that wasn't
70 * matched. Return 0 if all sought refs were matched, otherwise 1.
72 int report_unmatched_refs(struct ref
**sought
, int nr_sought
);