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 /* commit $GIT_DIR/shallow and reset stat-validity checks */
14 int commit_shallow_file(struct repository *r, struct lock_file *lk);
15 /* rollback $GIT_DIR/shallow and reset stat-validity checks */
16 void rollback_shallow_file(struct repository *r, struct lock_file *lk);
18 struct commit_list *get_shallow_commits(struct object_array *heads,
19 int depth, int shallow_flag, int not_shallow_flag);
20 struct commit_list *get_shallow_commits_by_rev_list(
21 int ac, const char **av, int shallow_flag, int not_shallow_flag);
22 int write_shallow_commits(struct strbuf *out, int use_pack_protocol,
23 const struct oid_array *extra);
25 void setup_alternate_shallow(struct lock_file *shallow_lock,
26 const char **alternate_shallow_file,
27 const struct oid_array *extra);
29 const char *setup_temporary_shallow(const struct oid_array *extra);
31 void advertise_shallow_grafts(int);
33 #define PRUNE_SHOW_ONLY 1
35 void prune_shallow(unsigned options);
38 * Initialize with prepare_shallow_info() or zero-initialize (equivalent to
39 * prepare_shallow_info with a NULL oid_array).
42 struct oid_array *shallow;
44 int *theirs, nr_theirs;
45 struct oid_array *ref;
47 /* for receive-pack */
48 uint32_t **used_shallow;
49 int *need_reachability_test;
52 struct commit **commits;
56 void prepare_shallow_info(struct shallow_info *, struct oid_array *);
57 void clear_shallow_info(struct shallow_info *);
58 void remove_nonexistent_theirs_shallow(struct shallow_info *);
59 void assign_shallow_commits_to_refs(struct shallow_info *info,
62 int delayed_reachability_test(struct shallow_info *si, int c);
64 extern struct trace_key trace_shallow;
66 #endif /* SHALLOW_H */