Diff options
Diffstat (limited to '')
-rw-r--r--source/ui-blame.c10
1 file changed, 2 insertions, 8 deletions
diff --git a/source/ui-blame.c b/source/ui-blame.c
index 2e281cf..28fd16f 100644
--- a/source/ui-blame.c
+++ b/source/ui-blame.c
@@ -388,15 +388,9 @@ void cgit_print_blame(void)
if (!rev)
rev = ctx.qry.head;
- if (repo_get_oid(the_repository, rev, &oid)) {
- cgit_print_error_page(404, "Not Found", "Bad object id: %s", rev);
+ commit = cgit_get_commit(rev, &oid);
+ if (!commit)
return;
- }
- commit = lookup_commit_reference(the_repository, &oid);
- if (!commit || repo_parse_commit(the_repository, commit)) {
- cgit_print_error_page(404, "Not Found", "Not a commit: %s", rev);
- return;
- }
walk.rev = rev;
walk.match_baselen = path_items.match ? basedir_len(path_items.match) : -1;