merge.h: move declarations for merge.c from cache.h

Signed-off-by: Elijah Newren <newren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Elijah Newren committed May 16, 2023 at 06:33 UTC 750324ddb876b54f52578df26278bf99c1e51eb9
6 files changed +21 -11
builtin/merge.c
+1
@@ -37,6 +37,7 @@
37 #include "color.h"
38 #include "rerere.h"
39 #include "help.h"
40 +#include "merge.h"
41 #include "merge-recursive.h"
42 #include "merge-ort-wrappers.h"
43 #include "resolve-undo.h"
builtin/pull.c
+1
@@ -12,6 +12,7 @@
12 #include "builtin.h"
13 #include "gettext.h"
14 #include "hex.h"
15 +#include "merge.h"
16 #include "object-name.h"
17 #include "parse-options.h"
18 #include "exec-cmd.h"
cache.h
-11
@@ -527,15 +527,4 @@ int add_files_to_cache(struct repository *repo, const char *prefix,
527 void overlay_tree_on_index(struct index_state *istate,
528 const char *tree_name, const char *prefix);
529
530 -/* merge.c */
531 -struct commit_list;
532 -int try_merge_command(struct repository *r,
533 - const char *strategy, size_t xopts_nr,
534 - const char **xopts, struct commit_list *common,
535 - const char *head_arg, struct commit_list *remotes);
536 -int checkout_fast_forward(struct repository *r,
537 - const struct object_id *from,
538 - const struct object_id *to,
539 - int overwrite_ignore);
540 -
530 #endif /* CACHE_H */
merge.c
+1
@@ -4,6 +4,7 @@
4 #include "gettext.h"
5 #include "hex.h"
6 #include "lockfile.h"
7 +#include "merge.h"
8 #include "commit.h"
9 #include "run-command.h"
10 #include "resolve-undo.h"
merge.h new
+17
@@ -0,0 +1,17 @@
1 +#ifndef MERGE_H
2 +#define MERGE_H
3 +
4 +struct commit_list;
5 +struct object_id;
6 +struct repository;
7 +
8 +int try_merge_command(struct repository *r,
9 + const char *strategy, size_t xopts_nr,
10 + const char **xopts, struct commit_list *common,
11 + const char *head_arg, struct commit_list *remotes);
12 +int checkout_fast_forward(struct repository *r,
13 + const struct object_id *from,
14 + const struct object_id *to,
15 + int overwrite_ignore);
16 +
17 +#endif /* MERGE_H */
sequencer.c
+1
@@ -25,6 +25,7 @@
25 #include "diff.h"
26 #include "revision.h"
27 #include "rerere.h"
28 +#include "merge.h"
29 #include "merge-ort.h"
30 #include "merge-ort-wrappers.h"
31 #include "refs.h"