Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorElijah Newren <newren@gmail.com>2023-05-16 09:33:54 +0300
committerJunio C Hamano <gitster@pobox.com>2023-06-21 23:39:53 +0300
commit750324ddb876b54f52578df26278bf99c1e51eb9 (patch)
treed3d8e94b02b80bedab684d6d9402f42b710fa14f
parenteaa966db798ca8b0313396f11fe7edfa78c2ddae (diff)
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>
-rw-r--r--builtin/merge.c1
-rw-r--r--builtin/pull.c1
-rw-r--r--cache.h11
-rw-r--r--merge.c1
-rw-r--r--merge.h17
-rw-r--r--sequencer.c1
6 files changed, 21 insertions, 11 deletions
diff --git a/builtin/merge.c b/builtin/merge.c
index 8da3e46abb..6e8f7b9bb5 100644
--- a/builtin/merge.c
+++ b/builtin/merge.c
@@ -37,6 +37,7 @@
#include "color.h"
#include "rerere.h"
#include "help.h"
+#include "merge.h"
#include "merge-recursive.h"
#include "merge-ort-wrappers.h"
#include "resolve-undo.h"
diff --git a/builtin/pull.c b/builtin/pull.c
index 0c7bac97b7..eb60c9d52f 100644
--- a/builtin/pull.c
+++ b/builtin/pull.c
@@ -12,6 +12,7 @@
#include "builtin.h"
#include "gettext.h"
#include "hex.h"
+#include "merge.h"
#include "object-name.h"
#include "parse-options.h"
#include "exec-cmd.h"
diff --git a/cache.h b/cache.h
index 08f6fbd801..5b690b80a1 100644
--- a/cache.h
+++ b/cache.h
@@ -527,15 +527,4 @@ int add_files_to_cache(struct repository *repo, const char *prefix,
void overlay_tree_on_index(struct index_state *istate,
const char *tree_name, const char *prefix);
-/* merge.c */
-struct commit_list;
-int try_merge_command(struct repository *r,
- const char *strategy, size_t xopts_nr,
- const char **xopts, struct commit_list *common,
- const char *head_arg, struct commit_list *remotes);
-int checkout_fast_forward(struct repository *r,
- const struct object_id *from,
- const struct object_id *to,
- int overwrite_ignore);
-
#endif /* CACHE_H */
diff --git a/merge.c b/merge.c
index 10aaec3a6c..fade6b203b 100644
--- a/merge.c
+++ b/merge.c
@@ -4,6 +4,7 @@
#include "gettext.h"
#include "hex.h"
#include "lockfile.h"
+#include "merge.h"
#include "commit.h"
#include "run-command.h"
#include "resolve-undo.h"
diff --git a/merge.h b/merge.h
new file mode 100644
index 0000000000..21ac7ef2f1
--- /dev/null
+++ b/merge.h
@@ -0,0 +1,17 @@
+#ifndef MERGE_H
+#define MERGE_H
+
+struct commit_list;
+struct object_id;
+struct repository;
+
+int try_merge_command(struct repository *r,
+ const char *strategy, size_t xopts_nr,
+ const char **xopts, struct commit_list *common,
+ const char *head_arg, struct commit_list *remotes);
+int checkout_fast_forward(struct repository *r,
+ const struct object_id *from,
+ const struct object_id *to,
+ int overwrite_ignore);
+
+#endif /* MERGE_H */
diff --git a/sequencer.c b/sequencer.c
index d132cd884f..bdcf2cc6d9 100644
--- a/sequencer.c
+++ b/sequencer.c
@@ -25,6 +25,7 @@
#include "diff.h"
#include "revision.h"
#include "rerere.h"
+#include "merge.h"
#include "merge-ort.h"
#include "merge-ort-wrappers.h"
#include "refs.h"