Skip to content

Commit ad6f3cc

Browse files
Kirill Smelkovgitster
authored andcommitted
tree-diff: diff_tree() should now be static
We reworked all its users to use the functionality through diff_tree_sha1 variant in recent patches (see "tree-diff: allow diff_tree_sha1 to accept NULL sha1" and what comes next). diff_tree() is now not used outside tree-diff.c - make it static. Signed-off-by: Kirill Smelkov <kirr@mns.spb.ru> Signed-off-by: Junio C Hamano <gitster@pobox.com>
1 parent 6ca844e commit ad6f3cc

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

diff.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -189,8 +189,6 @@ const char *diff_line_prefix(struct diff_options *);
189189

190190
extern const char mime_boundary_leader[];
191191

192-
extern int diff_tree(struct tree_desc *t1, struct tree_desc *t2,
193-
const char *base, struct diff_options *opt);
194192
extern int diff_tree_sha1(const unsigned char *old, const unsigned char *new,
195193
const char *base, struct diff_options *opt);
196194
extern int diff_root_tree_sha1(const unsigned char *new, const char *base,

tree-diff.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,8 +141,8 @@ static void skip_uninteresting(struct tree_desc *t, struct strbuf *base,
141141
}
142142
}
143143

144-
int diff_tree(struct tree_desc *t1, struct tree_desc *t2,
145-
const char *base_str, struct diff_options *opt)
144+
static int diff_tree(struct tree_desc *t1, struct tree_desc *t2,
145+
const char *base_str, struct diff_options *opt)
146146
{
147147
struct strbuf base;
148148
int baselen = strlen(base_str);

0 commit comments

Comments
 (0)