]> git.ipfire.org Git - thirdparty/git.git/commitdiff
match-trees.h: move declarations for match-trees.c functions from cache.h
authorElijah Newren <newren@gmail.com>
Sat, 22 Apr 2023 20:17:15 +0000 (20:17 +0000)
committerJunio C Hamano <gitster@pobox.com>
Mon, 24 Apr 2023 19:47:32 +0000 (12:47 -0700)
Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
cache.h
match-trees.c
match-trees.h [new file with mode: 0644]
merge-ort.c
merge-recursive.c
t/helper/test-match-trees.c

diff --git a/cache.h b/cache.h
index fde782a96f05b8ce0ae68ba460e01b4031bb6635..0570f9ad07da19fbe5200887db1a4f19fa8b2be5 100644 (file)
--- a/cache.h
+++ b/cache.h
@@ -603,10 +603,6 @@ int add_files_to_cache(const char *prefix, const struct pathspec *pathspec, int
 /* diff.c */
 extern int diff_auto_refresh_index;
 
-/* match-trees.c */
-void shift_tree(struct repository *, const struct object_id *, const struct object_id *, struct object_id *, int);
-void shift_tree_by(struct repository *, const struct object_id *, const struct object_id *, struct object_id *, const char *);
-
 /*
  * whitespace rules.
  * used by both diff and apply
index 5877fc64a8f93612ba65bfa19651d4e392695c55..9b78d99507b92113392e2ae848f9ebd88a6454fa 100644 (file)
@@ -1,5 +1,6 @@
 #include "cache.h"
 #include "hex.h"
+#include "match-trees.h"
 #include "tree.h"
 #include "tree-walk.h"
 #include "object-store.h"
diff --git a/match-trees.h b/match-trees.h
new file mode 100644 (file)
index 0000000..e3877ac
--- /dev/null
@@ -0,0 +1,10 @@
+#ifndef MATCH_TREES_H
+#define MATCH_TREES_H
+
+struct object_id;
+struct repository;
+
+void shift_tree(struct repository *, const struct object_id *, const struct object_id *, struct object_id *, int);
+void shift_tree_by(struct repository *, const struct object_id *, const struct object_id *, struct object_id *, const char *);
+
+#endif /* MATCH_TREES_H */
index 2c6a9ed9a4163033f4964f851d78fe4e72103071..65837db77f0e9aae20ca05c6d16ff6ccb079bf44 100644 (file)
@@ -31,6 +31,7 @@
 #include "hex.h"
 #include "entry.h"
 #include "ll-merge.h"
+#include "match-trees.h"
 #include "mem-pool.h"
 #include "object-name.h"
 #include "object-store.h"
index d4d2ab05b2e9990bb1f832b5f9e7d700525e88db..8e87b6386d9f7aee03ba63ee005122eb5d2556b7 100644 (file)
@@ -22,6 +22,7 @@
 #include "hex.h"
 #include "ll-merge.h"
 #include "lockfile.h"
+#include "match-trees.h"
 #include "object-file.h"
 #include "object-name.h"
 #include "object-store.h"
index 3808e1ac38b97d81b2c34ec841df3fc3237bbb20..a498fece7a36e866b07bfd9e8d79067eaa453eb3 100644 (file)
@@ -1,6 +1,7 @@
 #include "test-tool.h"
 #include "cache.h"
 #include "hex.h"
+#include "match-trees.h"
 #include "object-name.h"
 #include "setup.h"
 #include "tree.h"