249
250
struct oid_array;
251
struct ref;
252
-int register_shallow(struct repository *r, const struct object_id *oid);
253
-int unregister_shallow(const struct object_id *oid);
254
-int commit_shallow_file(struct repository *r, struct lock_file *lk);
255
-void rollback_shallow_file(struct repository *r, struct lock_file *lk);
252
int for_each_commit_graft(each_commit_graft_fn, void *);
257
-int is_repository_shallow(struct repository *r);
258
-struct commit_list *get_shallow_commits(struct object_array *heads,
259
- int depth, int shallow_flag, int not_shallow_flag);
260
-struct commit_list *get_shallow_commits_by_rev_list(
261
- int ac, const char **av, int shallow_flag, int not_shallow_flag);
262
-void set_alternate_shallow_file(struct repository *r, const char *path, int override);
263
-int write_shallow_commits(struct strbuf *out, int use_pack_protocol,
264
- const struct oid_array *extra);
265
-void setup_alternate_shallow(struct lock_file *shallow_lock,
266
- const char **alternate_shallow_file,
267
- const struct oid_array *extra);
268
-const char *setup_temporary_shallow(const struct oid_array *extra);
269
-void advertise_shallow_grafts(int);
270
-
271
-/*
272
- * Initialize with prepare_shallow_info() or zero-initialize (equivalent to
273
- * prepare_shallow_info with a NULL oid_array).
274
- */
275
-struct shallow_info {
276
- struct oid_array *shallow;
277
- int *ours, nr_ours;
278
- int *theirs, nr_theirs;
279
- struct oid_array *ref;
280
-
281
- /* for receive-pack */
282
- uint32_t **used_shallow;
283
- int *need_reachability_test;
284
- int *reachable;
285
- int *shallow_ref;
286
- struct commit **commits;
287
- int nr_commits;
288
-};
289
-
290
-void prepare_shallow_info(struct shallow_info *, struct oid_array *);
291
-void clear_shallow_info(struct shallow_info *);
292
-void remove_nonexistent_theirs_shallow(struct shallow_info *);
293
-void assign_shallow_commits_to_refs(struct shallow_info *info,
294
- uint32_t **used,
295
- int *ref_status);
296
-int delayed_reachability_test(struct shallow_info *si, int c);
297
-#define PRUNE_SHOW_ONLY 1
298
-#define PRUNE_QUICK 2
299
-void prune_shallow(unsigned options);
300
-extern struct trace_key trace_shallow;
253
254
int interactive_add(int argc, const char **argv, const char *prefix, int patch);
255
int run_add_interactive(const char *revision, const char *patch_mode,