diff options
author | Lars Hjemli <hjemli@gmail.com> | 2011-06-22 08:49:57 +0000 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2012-10-16 21:57:00 +0000 |
commit | c028b604ef666d64a8aa9ebdfcf69675cd5d13fb (patch) | |
tree | 9c69df9b766d56d3c91c7c88c5ceb8ba40cb9dc1 /cmd.c | |
parent | fdfb6a6d802d6b91061296eda9848d5819760d01 (diff) | |
download | cgit-c028b604ef666d64a8aa9ebdfcf69675cd5d13fb.tar cgit-c028b604ef666d64a8aa9ebdfcf69675cd5d13fb.tar.gz cgit-c028b604ef666d64a8aa9ebdfcf69675cd5d13fb.zip |
Grep the source, Lukelh/grep
This is a PoC for grepping the blobs in the current tree.
Signed-off-by: Lars Hjemli <larsh@hjemli.net>
Diffstat (limited to 'cmd.c')
-rw-r--r-- | cmd.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -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) \ |