6 #include "repository.h"
9 void set_alternate_shallow_file(struct repository *r, const char *path, int override);
10 int register_shallow(struct repository *r, const struct object_id *oid);
11 int unregister_shallow(const struct object_id *oid);
12 int is_repository_shallow(struct repository *r);
13 int commit_shallow_file(struct repository *r, struct lock_file *lk);
14 void rollback_shallow_file(struct repository *r, struct lock_file *lk);
16 struct commit_list *get_shallow_commits(struct object_array *heads,
17 int depth, int shallow_flag, int not_shallow_flag);
18 struct commit_list *get_shallow_commits_by_rev_list(
19 int ac, const char **av, int shallow_flag, int not_shallow_flag);
20 int write_shallow_commits(struct strbuf *out, int use_pack_protocol,
21 const struct oid_array *extra);
23 void setup_alternate_shallow(struct lock_file *shallow_lock,
24 const char **alternate_shallow_file,
25 const struct oid_array *extra);
27 const char *setup_temporary_shallow(const struct oid_array *extra);
29 void advertise_shallow_grafts(int);
31 #define PRUNE_SHOW_ONLY 1
33 void prune_shallow(unsigned options);
36 * Initialize with prepare_shallow_info() or zero-initialize (equivalent to
37 * prepare_shallow_info with a NULL oid_array).
40 struct oid_array *shallow;
42 int *theirs, nr_theirs;
43 struct oid_array *ref;
45 /* for receive-pack */
46 uint32_t **used_shallow;
47 int *need_reachability_test;
50 struct commit **commits;
54 void prepare_shallow_info(struct shallow_info *, struct oid_array *);
55 void clear_shallow_info(struct shallow_info *);
56 void remove_nonexistent_theirs_shallow(struct shallow_info *);
57 void assign_shallow_commits_to_refs(struct shallow_info *info,
60 int delayed_reachability_test(struct shallow_info *si, int c);
62 extern struct trace_key trace_shallow;
64 #endif /* SHALLOW_H */