]> git.ipfire.org Git - thirdparty/git.git/blobdiff - commit.h
Merge branch 'pw/rebase-i-more-options'
[thirdparty/git.git] / commit.h
index 8f4227ae5c232486eb3217c71131089b38a92ec8..bd73b8447203cb668742f5f809b57842d319a6aa 100644 (file)
--- a/commit.h
+++ b/commit.h
@@ -36,8 +36,6 @@ struct commit {
         * or get_commit_tree_oid().
         */
        struct tree *maybe_tree;
-       uint32_t graph_pos;
-       uint32_t generation;
        unsigned int index;
 };
 
@@ -236,6 +234,8 @@ struct commit_graft {
 typedef int (*each_commit_graft_fn)(const struct commit_graft *, void *);
 
 struct commit_graft *read_graft_line(struct strbuf *line);
+/* commit_graft_pos returns an index into r->parsed_objects->grafts. */
+int commit_graft_pos(struct repository *r, const unsigned char *sha1);
 int register_commit_graft(struct repository *r, struct commit_graft *, int);
 void prepare_commit_graft(struct repository *r);
 struct commit_graft *lookup_commit_graft(struct repository *r, const struct object_id *oid);
@@ -247,53 +247,7 @@ struct commit *get_fork_point(const char *refname, struct commit *commit);
 
 struct oid_array;
 struct ref;
-int register_shallow(struct repository *r, const struct object_id *oid);
-int unregister_shallow(const struct object_id *oid);
 int for_each_commit_graft(each_commit_graft_fn, void *);
-int is_repository_shallow(struct repository *r);
-struct commit_list *get_shallow_commits(struct object_array *heads,
-                                       int depth, int shallow_flag, int not_shallow_flag);
-struct commit_list *get_shallow_commits_by_rev_list(
-               int ac, const char **av, int shallow_flag, int not_shallow_flag);
-void set_alternate_shallow_file(struct repository *r, const char *path, int override);
-int write_shallow_commits(struct strbuf *out, int use_pack_protocol,
-                         const struct oid_array *extra);
-void setup_alternate_shallow(struct lock_file *shallow_lock,
-                            const char **alternate_shallow_file,
-                            const struct oid_array *extra);
-const char *setup_temporary_shallow(const struct oid_array *extra);
-void advertise_shallow_grafts(int);
-
-/*
- * Initialize with prepare_shallow_info() or zero-initialize (equivalent to
- * prepare_shallow_info with a NULL oid_array).
- */
-struct shallow_info {
-       struct oid_array *shallow;
-       int *ours, nr_ours;
-       int *theirs, nr_theirs;
-       struct oid_array *ref;
-
-       /* for receive-pack */
-       uint32_t **used_shallow;
-       int *need_reachability_test;
-       int *reachable;
-       int *shallow_ref;
-       struct commit **commits;
-       int nr_commits;
-};
-
-void prepare_shallow_info(struct shallow_info *, struct oid_array *);
-void clear_shallow_info(struct shallow_info *);
-void remove_nonexistent_theirs_shallow(struct shallow_info *);
-void assign_shallow_commits_to_refs(struct shallow_info *info,
-                                   uint32_t **used,
-                                   int *ref_status);
-int delayed_reachability_test(struct shallow_info *si, int c);
-#define PRUNE_SHOW_ONLY 1
-#define PRUNE_QUICK 2
-void prune_shallow(unsigned options);
-extern struct trace_key trace_shallow;
 
 int interactive_add(int argc, const char **argv, const char *prefix, int patch);
 int run_add_interactive(const char *revision, const char *patch_mode,