about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--ui-patch.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/ui-patch.c b/ui-patch.c index 57ca2f8..430231e 100644 --- a/ui-patch.c +++ b/ui-patch.c
@@ -25,26 +25,26 @@ void cgit_print_patch(const char *new_rev, const char *old_rev,
25 new_rev = ctx.qry.head; 25 new_rev = ctx.qry.head;
26 26
27 if (get_sha1(new_rev, new_rev_sha1)) { 27 if (get_sha1(new_rev, new_rev_sha1)) {
28 cgit_print_http_headers(); 28 cgit_print_error_page(404, "Not found",
29 cgit_print_error("Bad object id: %s", new_rev); 29 "Bad object id: %s", new_rev);
30 return; 30 return;
31 } 31 }
32 commit = lookup_commit_reference(new_rev_sha1); 32 commit = lookup_commit_reference(new_rev_sha1);
33 if (!commit) { 33 if (!commit) {
34 cgit_print_http_headers(); 34 cgit_print_error_page(404, "Not found",
35 cgit_print_error("Bad commit reference: %s", new_rev); 35 "Bad commit reference: %s", new_rev);
36 return; 36 return;
37 } 37 }
38 38
39 if (old_rev) { 39 if (old_rev) {
40 if (get_sha1(old_rev, old_rev_sha1)) { 40 if (get_sha1(old_rev, old_rev_sha1)) {
41 cgit_print_http_headers(); 41 cgit_print_error_page(404, "Not found",
42 cgit_print_error("Bad object id: %s", old_rev); 42 "Bad object id: %s", old_rev);
43 return; 43 return;
44 } 44 }
45 if (!lookup_commit_reference(old_rev_sha1)) { 45 if (!lookup_commit_reference(old_rev_sha1)) {
46 cgit_print_http_headers(); 46 cgit_print_error_page(404, "Not found",
47 cgit_print_error("Bad commit reference: %s", old_rev); 47 "Bad commit reference: %s", old_rev);
48 return; 48 return;
49 } 49 }
50 } else if (commit->parents && commit->parents->item) { 50 } else if (commit->parents && commit->parents->item) {