commit.h: remove method declarations

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>

Derrick Stolee committed Jul 20, 2018 at 16:33 UTC 6404355657fb3ec27668fb88c5175bb22aff3acc
24 files changed +23 -30
bisect.c
+1
@@ -13,6 +13,7 @@
13 #include "sha1-array.h"
14 #include "argv-array.h"
15 #include "commit-slab.h"
16 +#include "commit-reach.h"
17
18 static struct oid_array good_revs;
19 static struct oid_array skipped_revs;
builtin/branch.c
+1
@@ -23,6 +23,7 @@
23 #include "ref-filter.h"
24 #include "worktree.h"
25 #include "help.h"
26 +#include "commit-reach.h"
27
28 static const char * const builtin_branch_usage[] = {
29 N_("git branch [<options>] [-r | -a] [--merged | --no-merged]"),
builtin/commit.c
+1
@@ -33,6 +33,7 @@
33 #include "sequencer.h"
34 #include "mailmap.h"
35 #include "help.h"
36 +#include "commit-reach.h"
37
38 static const char * const builtin_commit_usage[] = {
39 N_("git commit [<options>] [--] <pathspec>..."),
builtin/fetch.c
+1
@@ -22,6 +22,7 @@
22 #include "utf8.h"
23 #include "packfile.h"
24 #include "list-objects-filter-options.h"
25 +#include "commit-reach.h"
26
27 static const char * const builtin_fetch_usage[] = {
28 N_("git fetch [<options>] [<repository> [<refspec>...]]"),
builtin/fmt-merge-msg.c
+1
@@ -12,6 +12,7 @@
12 #include "fmt-merge-msg.h"
13 #include "gpg-interface.h"
14 #include "repository.h"
15 +#include "commit-reach.h"
16
17 static const char * const fmt_merge_msg_usage[] = {
18 N_("git fmt-merge-msg [-m <message>] [--log[=<n>] | --no-log] [--file <file>]"),
builtin/log.c
+1
@@ -31,6 +31,7 @@
31 #include "progress.h"
32 #include "commit-slab.h"
33 #include "repository.h"
34 +#include "commit-reach.h"
35
36 #define MAIL_DEFAULT_WRAP 72
37
builtin/merge-base.c
+1
@@ -7,6 +7,7 @@
7 #include "revision.h"
8 #include "parse-options.h"
9 #include "repository.h"
10 +#include "commit-reach.h"
11
12 static int show_merge_base(struct commit **rev, int rev_nr, int show_all)
13 {
builtin/merge.c
+1
@@ -36,6 +36,7 @@
36 #include "packfile.h"
37 #include "tag.h"
38 #include "alias.h"
39 +#include "commit-reach.h"
40
41 #define DEFAULT_TWOHEAD (1<<0)
42 #define DEFAULT_OCTOPUS (1<<1)
builtin/pull.c
+1
@@ -22,6 +22,7 @@
22 #include "tempfile.h"
23 #include "lockfile.h"
24 #include "wt-status.h"
25 +#include "commit-reach.h"
26
27 enum rebase_type {
28 REBASE_INVALID = -1,
builtin/receive-pack.c
+1
@@ -27,6 +27,7 @@
27 #include "packfile.h"
28 #include "object-store.h"
29 #include "protocol.h"
30 +#include "commit-reach.h"
31
32 static const char * const receive_pack_usage[] = {
33 N_("git receive-pack <git-dir>"),
builtin/rev-parse.c
+1
@@ -14,6 +14,7 @@
14 #include "revision.h"
15 #include "split-index.h"
16 #include "submodule.h"
17 +#include "commit-reach.h"
18
19 #define DO_REVS 1
20 #define DO_NOREV 2
commit.h
-29
@@ -204,13 +204,6 @@ struct commit_graft *read_graft_line(struct strbuf *line);
204 int register_commit_graft(struct repository *r, struct commit_graft *, int);
205 struct commit_graft *lookup_commit_graft(struct repository *r, const struct object_id *oid);
206
207 -extern struct commit_list *get_merge_bases(struct commit *rev1, struct commit *rev2);
208 -extern struct commit_list *get_merge_bases_many(struct commit *one, int n, struct commit **twos);
209 -extern struct commit_list *get_octopus_merge_bases(struct commit_list *in);
210 -
211 -/* To be used only when object flags after this call no longer matter */
212 -extern struct commit_list *get_merge_bases_many_dirty(struct commit *one, int n, struct commit **twos);
213 -
207 /* largest positive number a signed 32-bit integer can contain */
208 #define INFINITE_DEPTH 0x7fffffff
209
@@ -258,32 +251,10 @@ extern int delayed_reachability_test(struct shallow_info *si, int c);
251 extern void prune_shallow(int show_only);
252 extern struct trace_key trace_shallow;
253
261 -int is_descendant_of(struct commit *, struct commit_list *);
262 -int in_merge_bases(struct commit *, struct commit *);
263 -int in_merge_bases_many(struct commit *, int, struct commit **);
264 -
254 extern int interactive_add(int argc, const char **argv, const char *prefix, int patch);
255 extern int run_add_interactive(const char *revision, const char *patch_mode,
256 const struct pathspec *pathspec);
257
269 -/*
270 - * Takes a list of commits and returns a new list where those
271 - * have been removed that can be reached from other commits in
272 - * the list. It is useful for, e.g., reducing the commits
273 - * randomly thrown at the git-merge command and removing
274 - * redundant commits that the user shouldn't have given to it.
275 - *
276 - * This function destroys the STALE bit of the commit objects'
277 - * flags.
278 - */
279 -extern struct commit_list *reduce_heads(struct commit_list *heads);
280 -
281 -/*
282 - * Like `reduce_heads()`, except it replaces the list. Use this
283 - * instead of `foo = reduce_heads(foo);` to avoid memory leaks.
284 - */
285 -extern void reduce_heads_replace(struct commit_list **heads);
286 -
258 struct commit_extra_header {
259 struct commit_extra_header *next;
260 char *key;
fast-import.c
+1
@@ -171,6 +171,7 @@ Format of STDIN stream:
171 #include "packfile.h"
172 #include "object-store.h"
173 #include "mem-pool.h"
174 +#include "commit-reach.h"
175
176 #define PACK_ID_BITS 16
177 #define MAX_PACK_ID ((1<<PACK_ID_BITS)-1)
http-push.c
+1 -1
@@ -14,7 +14,7 @@
14 #include "argv-array.h"
15 #include "packfile.h"
16 #include "object-store.h"
17 -
17 +#include "commit-reach.h"
18
19 #ifdef EXPAT_NEEDS_XMLPARSE_H
20 #include <xmlparse.h>
merge-recursive.c
+1
@@ -27,6 +27,7 @@
27 #include "dir.h"
28 #include "submodule.h"
29 #include "revision.h"
30 +#include "commit-reach.h"
31
32 struct path_hashmap_entry {
33 struct hashmap_entry e;
notes-merge.c
+1
@@ -12,6 +12,7 @@
12 #include "notes-merge.h"
13 #include "strbuf.h"
14 #include "notes-utils.h"
15 +#include "commit-reach.h"
16
17 struct notes_merge_pair {
18 struct object_id obj, base, local, remote;
pack-bitmap-write.c
+1
@@ -11,6 +11,7 @@
11 #include "pack-bitmap.h"
12 #include "sha1-lookup.h"
13 #include "pack-objects.h"
14 +#include "commit-reach.h"
15
16 struct bitmapped_commit {
17 struct commit *commit;
ref-filter.c
+1
@@ -19,6 +19,7 @@
19 #include "wt-status.h"
20 #include "commit-slab.h"
21 #include "commit-graph.h"
22 +#include "commit-reach.h"
23
24 static struct ref_msg {
25 const char *gone;
remote.c
+1
@@ -12,6 +12,7 @@
12 #include "string-list.h"
13 #include "mergesort.h"
14 #include "argv-array.h"
15 +#include "commit-reach.h"
16
17 enum map_direction { FROM_SRC, FROM_DST };
18
revision.c
+1
@@ -24,6 +24,7 @@
24 #include "packfile.h"
25 #include "worktree.h"
26 #include "argv-array.h"
27 +#include "commit-reach.h"
28
29 volatile show_early_output_fn_t show_early_output;
30
sequencer.c
+1
@@ -30,6 +30,7 @@
30 #include "oidset.h"
31 #include "commit-slab.h"
32 #include "alias.h"
33 +#include "commit-reach.h"
34
35 #define GIT_REFLOG_ACTION "GIT_REFLOG_ACTION"
36
sha1-name.c
+1
@@ -12,6 +12,7 @@
12 #include "packfile.h"
13 #include "object-store.h"
14 #include "repository.h"
15 +#include "commit-reach.h"
16
17 static int get_oid_oneline(const char *, struct object_id *, struct commit_list *);
18
shallow.c
+1
@@ -16,6 +16,7 @@
16 #include "list-objects.h"
17 #include "commit-slab.h"
18 #include "repository.h"
19 +#include "commit-reach.h"
20
21 void set_alternate_shallow_file(struct repository *r, const char *path, int override)
22 {
submodule.c
+1
@@ -22,6 +22,7 @@
22 #include "worktree.h"
23 #include "parse-options.h"
24 #include "object-store.h"
25 +#include "commit-reach.h"
26
27 static int config_update_recurse_submodules = RECURSE_SUBMODULES_OFF;
28 static struct string_list changed_submodule_names = STRING_LIST_INIT_DUP;