Diff options
Diffstat (limited to '')
| -rw-r--r-- | source/ui-snapshot.c | 8 |
1 file changed, 1 insertion, 7 deletions
diff --git a/source/ui-snapshot.c b/source/ui-snapshot.c index 2fa121f..333bce6 100644 --- a/source/ui-snapshot.c +++ b/source/ui-snapshot.c @@ -224,14 +224,8 @@ static void send_snapshot(const struct cgit_snapshot_format *format, const char { struct object_id oid; - if (repo_get_oid(the_repository, hex, &oid)) { - cgit_print_error_page(404, "Not Found", "Bad object id: %s", hex); + if (!cgit_get_commit(hex, &oid)) return; - } - if (!lookup_commit_reference(the_repository, &oid)) { - cgit_print_error_page(404, "Not Found", "Not a commit: %s", hex); - return; - } // A compressor that cannot run only shows up as a broken pipe once // the tar is under way, so it is looked for while a status can still // say so. |
