]> git.ipfire.org Git - thirdparty/git.git/commitdiff
merge.h: move declarations for merge.c from cache.h
authorElijah Newren <newren@gmail.com>
Tue, 16 May 2023 06:33:54 +0000 (06:33 +0000)
committerJunio C Hamano <gitster@pobox.com>
Wed, 21 Jun 2023 20:39:53 +0000 (13:39 -0700)
Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/merge.c
builtin/pull.c
cache.h
merge.c
merge.h [new file with mode: 0644]
sequencer.c

index 8da3e46abb0fdc692faac47e0b0deb9e13fe4194..6e8f7b9bb5319fe848fc56bd351ac3daf971383f 100644 (file)
@@ -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"
index 0c7bac97b75b5e8685d45a3a653f3348d7702c6a..eb60c9d52fa9fe9d75e099965371f106d0ece0b3 100644 (file)
@@ -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 08f6fbd801d890189b5d3078f37ab470a7704466..5b690b80a167f411b40a664423c6816f3254141a 100644 (file)
--- 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 10aaec3a6c1afca8fef4e3aac3dcd0d1cd2b9f63..fade6b203b3e351ca41732d412c07c823dbbe46d 100644 (file)
--- 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 (file)
index 0000000..21ac7ef
--- /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 */
index d132cd884f90f0f9a853202a51b0b68cdeabcbd4..bdcf2cc6d9dd0c276a9b531744ae2ac0bb83c860 100644 (file)
@@ -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"