aboutsummaryrefslogtreecommitdiff
diff refs
from: back
to: back
| flip
diff options
context:
space:
mode:
-rw-r--r--ui-plain.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/ui-plain.c b/ui-plain.c
index be559e0..35888a0 100644
--- a/ui-plain.c
+++ b/ui-plain.c
@@ -43,7 +43,9 @@ static int walk_tree(const unsigned char *sha1, const char *base, int baselen,
const char *pathname, unsigned mode, int stage,
void *cbdata)
{
- if (S_ISDIR(mode))
+ fprintf(stderr, "[cgit] walk_tree.pathname=%s", pathname);
+
+ if (!pathname || strcmp(match_path, pathname))
return READ_TREE_RECURSIVE;
if (S_ISREG(mode))
@@ -73,6 +75,7 @@ void cgit_print_plain(struct cgit_context *ctx)
return;
}
match_path = ctx->qry.path;
+ fprintf(stderr, "[cgit] match_path=%s", match_path);
read_tree_recursive(commit->tree, NULL, 0, 0, paths, walk_tree, NULL);
if (!match)
html_status(404, "Not found", 0);