tree-diff: diff_tree() should now be static
authorKirill Smelkov <kirr@mns.spb.ru>
Mon, 24 Feb 2014 16:21:45 +0000 (20:21 +0400)
committerJunio C Hamano <gitster@pobox.com>
Wed, 26 Mar 2014 21:30:47 +0000 (14:30 -0700)
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>
diff.h
tree-diff.c
diff --git a/diff.h b/diff.h
index e79f3b3ff09aede32e5bdcf2fbbcaaa130ef6bbb..5d7b9f7577a393abc7cb71db6df966b29128629f 100644 (file)
--- a/diff.h
+++ b/diff.h
@@ -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,
index 8e04002c0ecd21d27c3fe9a0564029815b7b9307..0e43906b4318c0b5b4c31d874fe12eb570356790 100644 (file)
@@ -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);