sha1_file: restore OBJECT_INFO_QUICK functionality
[git/debian.git] / fetch-pack.h
blobaeac1526445efdbe0c639056e3a4175ab3a697e9
1 #ifndef FETCH_PACK_H
2 #define FETCH_PACK_H
4 #include "string-list.h"
5 #include "run-command.h"
7 struct oid_array;
9 struct fetch_pack_args {
10 const char *uploadpack;
11 int unpacklimit;
12 int depth;
13 const char *deepen_since;
14 const struct string_list *deepen_not;
15 unsigned deepen_relative:1;
16 unsigned quiet:1;
17 unsigned keep_pack:1;
18 unsigned lock_pack:1;
19 unsigned use_thin_pack:1;
20 unsigned fetch_all:1;
21 unsigned stdin_refs:1;
22 unsigned diag_url:1;
23 unsigned verbose:1;
24 unsigned no_progress:1;
25 unsigned include_tag:1;
26 unsigned stateless_rpc:1;
27 unsigned check_self_contained_and_connected:1;
28 unsigned self_contained_and_connected:1;
29 unsigned cloning:1;
30 unsigned update_shallow:1;
31 unsigned deepen:1;
32 unsigned from_promisor:1;
35 * If 1, fetch_pack() will also not modify any object flags.
36 * This allows fetch_pack() to safely be called by any function,
37 * regardless of which object flags it uses (if any).
39 unsigned no_dependents:1;
43 * sought represents remote references that should be updated from.
44 * On return, the names that were found on the remote will have been
45 * marked as such.
47 struct ref *fetch_pack(struct fetch_pack_args *args,
48 int fd[], struct child_process *conn,
49 const struct ref *ref,
50 const char *dest,
51 struct ref **sought,
52 int nr_sought,
53 struct oid_array *shallow,
54 char **pack_lockfile);
57 * Print an appropriate error message for each sought ref that wasn't
58 * matched. Return 0 if all sought refs were matched, otherwise 1.
60 int report_unmatched_refs(struct ref **sought, int nr_sought);
62 #endif