summaryrefslogtreecommitdiffabout
path: root/ui-tree.c
Unidiff
Diffstat (limited to 'ui-tree.c') (more/less context) (ignore whitespace changes)
-rw-r--r--ui-tree.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ui-tree.c b/ui-tree.c
index f281937..94aff8f 100644
--- a/ui-tree.c
+++ b/ui-tree.c
@@ -265,27 +265,27 @@ void cgit_print_tree(const char *rev, char *path)
265 if (!rev) 265 if (!rev)
266 rev = ctx.qry.head; 266 rev = ctx.qry.head;
267 267
268 curr_rev = xstrdup(rev); 268 curr_rev = xstrdup(rev);
269 if (get_sha1(rev, sha1)) { 269 if (get_sha1(rev, sha1)) {
270 cgit_print_error(fmt("Invalid revision name: %s", rev)); 270 cgit_print_error(fmt("Invalid revision name: %s", rev));
271 return; 271 return;
272 } 272 }
273 commit = lookup_commit_reference(sha1); 273 commit = lookup_commit_reference(sha1);
274 if (!commit || parse_commit(commit)) { 274 if (!commit || parse_commit(commit)) {
275 cgit_print_error(fmt("Invalid commit reference: %s", rev)); 275 cgit_print_error(fmt("Invalid commit reference: %s", rev));
276 return; 276 return;
277 } 277 }
278 278
279 html("path: <a href='"); 279 html("path: <a href='");
280 html_attr(cgit_pageurl(ctx.qry.repo, "tree", fmt("h=%s", rev))); 280 html_attr(cgit_pageurl(ctx.qry.repo, "tree", fmt("h=%s", rev)));
281 html("'>root</a>"); 281 html("'>root</a>");
282 282
283 if (path == NULL) { 283 if (path == NULL) {
284 ls_tree(commit->tree->object.sha1, NULL); 284 ls_tree(commit->tree->object.sha1, NULL);
285 return; 285 return;
286 } 286 }
287 287
288 match_path = path; 288 match_path = path;
289 read_tree_recursive(commit->tree, NULL, 0, 0, paths, walk_tree, NULL); 289 read_tree_recursive(commit->tree, "", 0, 0, paths, walk_tree, NULL);
290 ls_tail(); 290 ls_tail();
291} 291}