Skip to content

Commit

Permalink
tree-diff: diff_tree() should now be static
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Kirill Smelkov authored and Junio C Hamano committed Mar 26, 2014
1 parent 6ca844e commit ad6f3cc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 0 additions & 2 deletions diff.h
Original file line number Diff line number Diff line change
Expand Up @@ -189,8 +189,6 @@ const char *diff_line_prefix(struct diff_options *);

extern const char mime_boundary_leader[];

extern int diff_tree(struct tree_desc *t1, struct tree_desc *t2,
const char *base, struct diff_options *opt);
extern int diff_tree_sha1(const unsigned char *old, const unsigned char *new,
const char *base, struct diff_options *opt);
extern int diff_root_tree_sha1(const unsigned char *new, const char *base,
Expand Down
4 changes: 2 additions & 2 deletions tree-diff.c
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,8 @@ static void skip_uninteresting(struct tree_desc *t, struct strbuf *base,
}
}

int diff_tree(struct tree_desc *t1, struct tree_desc *t2,
const char *base_str, struct diff_options *opt)
static int diff_tree(struct tree_desc *t1, struct tree_desc *t2,
const char *base_str, struct diff_options *opt)
{
struct strbuf base;
int baselen = strlen(base_str);
Expand Down

0 comments on commit ad6f3cc

Please sign in to comment.