diff options
-rw-r--r-- | ui-tree.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -14,6 +14,7 @@ | |||
14 | char *curr_rev; | 14 | char *curr_rev; |
15 | char *match_path; | 15 | char *match_path; |
16 | int header = 0; | 16 | int header = 0; |
17 | static int state; | ||
17 | 18 | ||
18 | static void print_text_buffer(const char *name, char *buf, unsigned long size) | 19 | static void print_text_buffer(const char *name, char *buf, unsigned long size) |
19 | { | 20 | { |
@@ -223,7 +224,6 @@ static int walk_tree(const unsigned char *sha1, const char *base, int baselen, | |||
223 | const char *pathname, unsigned mode, int stage, | 224 | const char *pathname, unsigned mode, int stage, |
224 | void *cbdata) | 225 | void *cbdata) |
225 | { | 226 | { |
226 | static int state; | ||
227 | static char buffer[PATH_MAX]; | 227 | static char buffer[PATH_MAX]; |
228 | 228 | ||
229 | if (state == 0) { | 229 | if (state == 0) { |
@@ -284,6 +284,7 @@ void cgit_print_tree(const char *rev, char *path) | |||
284 | } | 284 | } |
285 | 285 | ||
286 | match_path = path; | 286 | match_path = path; |
287 | state = 0; | ||
287 | read_tree_recursive(commit->tree, "", 0, 0, &paths, walk_tree, NULL); | 288 | read_tree_recursive(commit->tree, "", 0, 0, &paths, walk_tree, NULL); |
288 | ls_tail(); | 289 | ls_tail(); |
289 | } | 290 | } |