match-trees.h: move declarations for match-trees.c functions from cache.h
Signed-off-by: Elijah Newren <newren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Elijah Newren committed
Apr 22, 2023 at 20:17 UTC
d4ff2072abed071bc9fd291d179162da46d1427f
6 files changed
+14
-4
cache.h
-4
@@ -603,10 +603,6 @@ int add_files_to_cache(const char *prefix, const struct pathspec *pathspec, int
603
/* diff.c */
604
extern int diff_auto_refresh_index;
605
606
-/* match-trees.c */
607
-void shift_tree(struct repository *, const struct object_id *, const struct object_id *, struct object_id *, int);
608
-void shift_tree_by(struct repository *, const struct object_id *, const struct object_id *, struct object_id *, const char *);
609
-
606
/*
607
* whitespace rules.
608
* used by both diff and apply
match-trees.c
+1
@@ -1,5 +1,6 @@
1
#include "cache.h"
2
#include "hex.h"
3
+#include "match-trees.h"
4
#include "tree.h"
5
#include "tree-walk.h"
6
#include "object-store.h"
match-trees.h
new
+10
@@ -0,0 +1,10 @@
1
+#ifndef MATCH_TREES_H
2
+#define MATCH_TREES_H
3
+
4
+struct object_id;
5
+struct repository;
6
+
7
+void shift_tree(struct repository *, const struct object_id *, const struct object_id *, struct object_id *, int);
8
+void shift_tree_by(struct repository *, const struct object_id *, const struct object_id *, struct object_id *, const char *);
9
+
10
+#endif /* MATCH_TREES_H */
merge-ort.c
+1
@@ -31,6 +31,7 @@
31
#include "hex.h"
32
#include "entry.h"
33
#include "ll-merge.h"
34
+#include "match-trees.h"
35
#include "mem-pool.h"
36
#include "object-name.h"
37
#include "object-store.h"
merge-recursive.c
+1
@@ -22,6 +22,7 @@
22
#include "hex.h"
23
#include "ll-merge.h"
24
#include "lockfile.h"
25
+#include "match-trees.h"
26
#include "object-file.h"
27
#include "object-name.h"
28
#include "object-store.h"
t/helper/test-match-trees.c
+1
@@ -1,6 +1,7 @@
1
#include "test-tool.h"
2
#include "cache.h"
3
#include "hex.h"
4
+#include "match-trees.h"
5
#include "object-name.h"
6
#include "setup.h"
7
#include "tree.h"