Grep the source, Luke

This is a PoC for grepping the blobs in the current tree.

Signed-off-by: Lars Hjemli <larsh@hjemli.net>
This commit is contained in:
Lars Hjemli 2011-06-22 08:49:57 +00:00 committed by Jason A. Donenfeld
parent fdfb6a6d80
commit c028b604ef
5 changed files with 223 additions and 8 deletions

5
cmd.c
View file

@ -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) \