Skip to content

Commit d4ff207

Browse files
newrengitster
authored andcommitted
match-trees.h: move declarations for match-trees.c functions from cache.h
Signed-off-by: Elijah Newren <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent b388633 commit d4ff207

File tree

6 files changed

+14
-4
lines changed

6 files changed

+14
-4
lines changed

cache.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -603,10 +603,6 @@ int add_files_to_cache(const char *prefix, const struct pathspec *pathspec, int
603603
/* diff.c */
604604
extern int diff_auto_refresh_index;
605605

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-
610606
/*
611607
* whitespace rules.
612608
* used by both diff and apply

match-trees.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#include "cache.h"
22
#include "hex.h"
3+
#include "match-trees.h"
34
#include "tree.h"
45
#include "tree-walk.h"
56
#include "object-store.h"

match-trees.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
#include "hex.h"
3232
#include "entry.h"
3333
#include "ll-merge.h"
34+
#include "match-trees.h"
3435
#include "mem-pool.h"
3536
#include "object-name.h"
3637
#include "object-store.h"

merge-recursive.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
#include "hex.h"
2323
#include "ll-merge.h"
2424
#include "lockfile.h"
25+
#include "match-trees.h"
2526
#include "object-file.h"
2627
#include "object-name.h"
2728
#include "object-store.h"

t/helper/test-match-trees.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#include "test-tool.h"
22
#include "cache.h"
33
#include "hex.h"
4+
#include "match-trees.h"
45
#include "object-name.h"
56
#include "setup.h"
67
#include "tree.h"

0 commit comments

Comments
 (0)