From c028b604ef666d64a8aa9ebdfcf69675cd5d13fb Mon Sep 17 00:00:00 2001 From: Lars Hjemli Date: Wed, 22 Jun 2011 08:49:57 +0000 Subject: Grep the source, Luke This is a PoC for grepping the blobs in the current tree. Signed-off-by: Lars Hjemli --- cmd.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'cmd.c') diff --git a/cmd.c b/cmd.c index 5a3d157..9a040a2 100644 --- a/cmd.c +++ b/cmd.c @@ -127,7 +127,10 @@ static void tag_fn(struct cgit_context *ctx) static void tree_fn(struct cgit_context *ctx) { - cgit_print_tree(ctx->qry.sha1, ctx->qry.path); + if (ctx->qry.grep) + cgit_grep(ctx->qry.sha1, ctx->qry.path, ctx->qry.grep); + else + cgit_print_tree(ctx->qry.sha1, ctx->qry.path); } #define def_cmd(name, want_repo, want_layout, want_vpath, is_clone) \ -- cgit v1.2.3-24-g4f1b