commit.h: remove method declarations
authorDerrick Stolee <dstolee@microsoft.com>
Fri, 20 Jul 2018 16:33:04 +0000 (16:33 +0000)
committerJunio C Hamano <gitster@pobox.com>
Fri, 20 Jul 2018 22:38:54 +0000 (15:38 -0700)
These methods are now declared in commit-reach.h. Remove them from
commit.h and add new include statements in all files that require these
declarations.

Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
24 files changed:
bisect.c
builtin/branch.c
builtin/commit.c
builtin/fetch.c
builtin/fmt-merge-msg.c
builtin/log.c
builtin/merge-base.c
builtin/merge.c
builtin/pull.c
builtin/receive-pack.c
builtin/rev-parse.c
commit.h
fast-import.c
http-push.c
merge-recursive.c
notes-merge.c
pack-bitmap-write.c
ref-filter.c
remote.c
revision.c
sequencer.c
sha1-name.c
shallow.c
submodule.c
index e1275ba79e8e7368f5448043e321db2b9376aa71..d023543c911d040b651f343a05b818b053def808 100644 (file)
--- a/bisect.c
+++ b/bisect.c
@@ -13,6 +13,7 @@
 #include "sha1-array.h"
 #include "argv-array.h"
 #include "commit-slab.h"
+#include "commit-reach.h"
 
 static struct oid_array good_revs;
 static struct oid_array skipped_revs;
index a50632fb23f52e3bad6de8a8e225498f4071fc58..9a787447f47bacf85ef03a765ade27f8945fd190 100644 (file)
@@ -23,6 +23,7 @@
 #include "ref-filter.h"
 #include "worktree.h"
 #include "help.h"
+#include "commit-reach.h"
 
 static const char * const builtin_branch_usage[] = {
        N_("git branch [<options>] [-r | -a] [--merged | --no-merged]"),
index 158e3f843afbf889e26328f29cb2894f17da4ee1..b5c608458e8a20f3a96b7103d4437f499edb2026 100644 (file)
@@ -33,6 +33,7 @@
 #include "sequencer.h"
 #include "mailmap.h"
 #include "help.h"
+#include "commit-reach.h"
 
 static const char * const builtin_commit_usage[] = {
        N_("git commit [<options>] [--] <pathspec>..."),
index f5d960baecf6c901ca656370308ebebd8dbcdb76..7de234774be0383269f42453c09cb2c0e79095dc 100644 (file)
@@ -22,6 +22,7 @@
 #include "utf8.h"
 #include "packfile.h"
 #include "list-objects-filter-options.h"
+#include "commit-reach.h"
 
 static const char * const builtin_fetch_usage[] = {
        N_("git fetch [<options>] [<repository> [<refspec>...]]"),
index ff165c0fcd209f1bab596905a61bdfa6b491208a..7277d557b2d1972250e5b8b4117bc3be23964b6f 100644 (file)
@@ -12,6 +12,7 @@
 #include "fmt-merge-msg.h"
 #include "gpg-interface.h"
 #include "repository.h"
+#include "commit-reach.h"
 
 static const char * const fmt_merge_msg_usage[] = {
        N_("git fmt-merge-msg [-m <message>] [--log[=<n>] | --no-log] [--file <file>]"),
index 55a6286d7f4a954db80a1564f15d0db465f9b1d6..333d97c69288ac2ded86ed38431e94660b372cdd 100644 (file)
@@ -31,6 +31,7 @@
 #include "progress.h"
 #include "commit-slab.h"
 #include "repository.h"
+#include "commit-reach.h"
 
 #define MAIL_DEFAULT_WRAP 72
 
index 08d91b1f0c0172fef93f1a87bf0843a85f57ca37..1c920990701381452da910e4cee66be5e6fde5a0 100644 (file)
@@ -7,6 +7,7 @@
 #include "revision.h"
 #include "parse-options.h"
 #include "repository.h"
+#include "commit-reach.h"
 
 static int show_merge_base(struct commit **rev, int rev_nr, int show_all)
 {
index d1b547d97376d74e02e8f3dae3a1afb64dd2b780..4c601c40a2efbb459325a3c6f62a1863172d1e75 100644 (file)
@@ -36,6 +36,7 @@
 #include "packfile.h"
 #include "tag.h"
 #include "alias.h"
+#include "commit-reach.h"
 
 #define DEFAULT_TWOHEAD (1<<0)
 #define DEFAULT_OCTOPUS (1<<1)
index 4e789353922340c3d0727a2e2c3e60e5a9936ee5..15ad01096817c9108e56647c4d52051968979a99 100644 (file)
@@ -22,6 +22,7 @@
 #include "tempfile.h"
 #include "lockfile.h"
 #include "wt-status.h"
+#include "commit-reach.h"
 
 enum rebase_type {
        REBASE_INVALID = -1,
index 400d31c18ccd97a896f686c05a646147aa07ca2c..d8467f97343438e10badd28e34ab3e5dc310a028 100644 (file)
@@ -27,6 +27,7 @@
 #include "packfile.h"
 #include "object-store.h"
 #include "protocol.h"
+#include "commit-reach.h"
 
 static const char * const receive_pack_usage[] = {
        N_("git receive-pack <git-dir>"),
index 0f09bbbf65a4bc8d6d064a985181ac547d9ee411..455f62246d69ad0468ffde58e568732bd3339c63 100644 (file)
@@ -14,6 +14,7 @@
 #include "revision.h"
 #include "split-index.h"
 #include "submodule.h"
+#include "commit-reach.h"
 
 #define DO_REVS                1
 #define DO_NOREV       2
index da0db36eba2bf16277dbb7aadcb3384e29191ecc..e2c99d9b04f6b2b841c94524e4c56c34d89b282c 100644 (file)
--- a/commit.h
+++ b/commit.h
@@ -204,13 +204,6 @@ struct commit_graft *read_graft_line(struct strbuf *line);
 int register_commit_graft(struct repository *r, struct commit_graft *, int);
 struct commit_graft *lookup_commit_graft(struct repository *r, const struct object_id *oid);
 
-extern struct commit_list *get_merge_bases(struct commit *rev1, struct commit *rev2);
-extern struct commit_list *get_merge_bases_many(struct commit *one, int n, struct commit **twos);
-extern struct commit_list *get_octopus_merge_bases(struct commit_list *in);
-
-/* To be used only when object flags after this call no longer matter */
-extern struct commit_list *get_merge_bases_many_dirty(struct commit *one, int n, struct commit **twos);
-
 /* largest positive number a signed 32-bit integer can contain */
 #define INFINITE_DEPTH 0x7fffffff
 
@@ -258,32 +251,10 @@ extern int delayed_reachability_test(struct shallow_info *si, int c);
 extern void prune_shallow(int show_only);
 extern struct trace_key trace_shallow;
 
-int is_descendant_of(struct commit *, struct commit_list *);
-int in_merge_bases(struct commit *, struct commit *);
-int in_merge_bases_many(struct commit *, int, struct commit **);
-
 extern int interactive_add(int argc, const char **argv, const char *prefix, int patch);
 extern int run_add_interactive(const char *revision, const char *patch_mode,
                               const struct pathspec *pathspec);
 
-/*
- * Takes a list of commits and returns a new list where those
- * have been removed that can be reached from other commits in
- * the list. It is useful for, e.g., reducing the commits
- * randomly thrown at the git-merge command and removing
- * redundant commits that the user shouldn't have given to it.
- *
- * This function destroys the STALE bit of the commit objects'
- * flags.
- */
-extern struct commit_list *reduce_heads(struct commit_list *heads);
-
-/*
- * Like `reduce_heads()`, except it replaces the list. Use this
- * instead of `foo = reduce_heads(foo);` to avoid memory leaks.
- */
-extern void reduce_heads_replace(struct commit_list **heads);
-
 struct commit_extra_header {
        struct commit_extra_header *next;
        char *key;
index 3ea5781029de661fb083fcd99acbae7c39c22904..4a93df3839dcb4565810538d5a3a48f74eb51f14 100644 (file)
@@ -171,6 +171,7 @@ Format of STDIN stream:
 #include "packfile.h"
 #include "object-store.h"
 #include "mem-pool.h"
+#include "commit-reach.h"
 
 #define PACK_ID_BITS 16
 #define MAX_PACK_ID ((1<<PACK_ID_BITS)-1)
index 5eaf551b51e7aaf87219d4af0ca19873484c90ca..91fdc7e1d5d987203d9df3a6c6a86b917f27b939 100644 (file)
@@ -14,7 +14,7 @@
 #include "argv-array.h"
 #include "packfile.h"
 #include "object-store.h"
-
+#include "commit-reach.h"
 
 #ifdef EXPAT_NEEDS_XMLPARSE_H
 #include <xmlparse.h>
index 1dd6ec384de132d24f96b2ee89639bb765de9589..8155dee9a98cbea8b1045d0436e0a170b0757555 100644 (file)
@@ -27,6 +27,7 @@
 #include "dir.h"
 #include "submodule.h"
 #include "revision.h"
+#include "commit-reach.h"
 
 struct path_hashmap_entry {
        struct hashmap_entry e;
index 76ab19e702423aeb511bfc1e939a7998c61fab61..12dfdf6c17015442d51577a0b621ec20d344ca20 100644 (file)
@@ -12,6 +12,7 @@
 #include "notes-merge.h"
 #include "strbuf.h"
 #include "notes-utils.h"
+#include "commit-reach.h"
 
 struct notes_merge_pair {
        struct object_id obj, base, local, remote;
index 953c5dd84dff2d87b639d29b71d844b29f925618..55bcab907c0ecf22d38ba512fe793c3d7f373ced 100644 (file)
@@ -11,6 +11,7 @@
 #include "pack-bitmap.h"
 #include "sha1-lookup.h"
 #include "pack-objects.h"
+#include "commit-reach.h"
 
 struct bitmapped_commit {
        struct commit *commit;
index 9b2da883926dcee0210b5fd0b0051ee84f9adadb..fca3ad040af6ab952aa3455a0fcf5836e77272ba 100644 (file)
@@ -19,6 +19,7 @@
 #include "wt-status.h"
 #include "commit-slab.h"
 #include "commit-graph.h"
+#include "commit-reach.h"
 
 static struct ref_msg {
        const char *gone;
index 26b1fbd9a881d2af7d7cc7a098fe182d36502d80..8e99b9888ab8d9f2a1daccbade04550330b27d83 100644 (file)
--- a/remote.c
+++ b/remote.c
@@ -12,6 +12,7 @@
 #include "string-list.h"
 #include "mergesort.h"
 #include "argv-array.h"
+#include "commit-reach.h"
 
 enum map_direction { FROM_SRC, FROM_DST };
 
index 4dbe406bed2aa13f0685d98f0932f997e88b4972..3205a3947ad122aa9c5d2f7bce5e85bd0a690c65 100644 (file)
@@ -24,6 +24,7 @@
 #include "packfile.h"
 #include "worktree.h"
 #include "argv-array.h"
+#include "commit-reach.h"
 
 volatile show_early_output_fn_t show_early_output;
 
index d1d07bed5bb051d980015c85129333effe66391c..97bdfd48b42c14911b8f87975be88ebd853f5374 100644 (file)
@@ -30,6 +30,7 @@
 #include "oidset.h"
 #include "commit-slab.h"
 #include "alias.h"
+#include "commit-reach.h"
 
 #define GIT_REFLOG_ACTION "GIT_REFLOG_ACTION"
 
index 009faab4aefc34f55daf6fd7e6e63ec0f0ee108a..7215b30b8861aaada90f578ef598e2a43793250b 100644 (file)
@@ -12,6 +12,7 @@
 #include "packfile.h"
 #include "object-store.h"
 #include "repository.h"
+#include "commit-reach.h"
 
 static int get_oid_oneline(const char *, struct object_id *, struct commit_list *);
 
index dbe8a2a2906abf9b393eeca1cdad8c9425c3e4bb..99fd2d1ba0f70aaf238f55aae006a12e38090342 100644 (file)
--- a/shallow.c
+++ b/shallow.c
@@ -16,6 +16,7 @@
 #include "list-objects.h"
 #include "commit-slab.h"
 #include "repository.h"
+#include "commit-reach.h"
 
 void set_alternate_shallow_file(struct repository *r, const char *path, int override)
 {
index 6688dd5d45949597d7d5761c9b88ea9fcceabf2d..6650ed7aa02b2b657929c8868d05b83583c0093a 100644 (file)
@@ -22,6 +22,7 @@
 #include "worktree.h"
 #include "parse-options.h"
 #include "object-store.h"
+#include "commit-reach.h"
 
 static int config_update_recurse_submodules = RECURSE_SUBMODULES_OFF;
 static struct string_list changed_submodule_names = STRING_LIST_INIT_DUP;