]> granicus.if.org Git - cgit/commitdiff
ui-tree: ls_tail: add walk table param
authorAndy Green <andy@warmcat.com>
Mon, 18 Jun 2018 06:24:20 +0000 (14:24 +0800)
committerAndy Green <andy@warmcat.com>
Thu, 28 Jun 2018 23:53:21 +0000 (07:53 +0800)
Arrange that walk_tree_ctx is available in ls_tail, we
will make use of it shortly.

Signed-off-by: Andy Green <andy@warmcat.com>
Reviewed-by: John Keeping <john@keeping.me.uk>
ui-tree.c

index 721c812203be971f2e1bde94a317ee44e2e0b61e..1ccbb22772ce5af615a344d2ee2f475500721f66 100644 (file)
--- a/ui-tree.c
+++ b/ui-tree.c
@@ -365,7 +365,7 @@ static void ls_head(void)
        html("</tr>\n");
 }
 
-static void ls_tail(void)
+static void ls_tail(struct walk_tree_context *walk_tree_ctx)
 {
        html("</table>\n");
        cgit_print_layout_end();
@@ -387,7 +387,7 @@ static void ls_tree(const struct object_id *oid, char *path, struct walk_tree_co
 
        ls_head();
        read_tree_recursive(tree, "", 0, 1, &paths, ls_item, walk_tree_ctx);
-       ls_tail();
+       ls_tail(walk_tree_ctx);
 }
 
 
@@ -470,7 +470,7 @@ void cgit_print_tree(const char *rev, char *path, bool use_render)
 
        read_tree_recursive(commit->maybe_tree, "", 0, 0, &paths, walk_tree, &walk_tree_ctx);
        if (walk_tree_ctx.state == 1)
-               ls_tail();
+               ls_tail(&walk_tree_ctx);
        else if (walk_tree_ctx.state == 2)
                cgit_print_layout_end();
        else