about summary refs log tree commit diff stats
path: root/ui-tree.c
diff options
context:
space:
mode:
Diffstat (limited to 'ui-tree.c')
-rw-r--r--ui-tree.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/ui-tree.c b/ui-tree.c index 305c951..8c87571 100644 --- a/ui-tree.c +++ b/ui-tree.c
@@ -14,6 +14,7 @@
14char *curr_rev; 14char *curr_rev;
15char *match_path; 15char *match_path;
16int header = 0; 16int header = 0;
17static int state;
17 18
18static void print_text_buffer(const char *name, char *buf, unsigned long size) 19static 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}