mirror of
https://git.zx2c4.com/cgit
synced 2025-07-09 17:54:35 +02:00
allow blob extract blobs by head/path combination
If blob is invoked with no id=, it tries to look up h= and search for path= in there. Once found, proceed as normal, otherwise, fail as normal. Signed-off-by: Michael Krelin <hacker@klever.net>
This commit is contained in:
parent
e6b635c2b1
commit
01d2dce7e7
3 changed files with 35 additions and 6 deletions
2
cmd.c
2
cmd.c
|
@ -32,7 +32,7 @@ static void about_fn(struct cgit_context *ctx)
|
|||
|
||||
static void blob_fn(struct cgit_context *ctx)
|
||||
{
|
||||
cgit_print_blob(ctx->qry.sha1, ctx->qry.path);
|
||||
cgit_print_blob(ctx->qry.sha1, ctx->qry.path, ctx->qry.head);
|
||||
}
|
||||
|
||||
static void commit_fn(struct cgit_context *ctx)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue