]> Lady’s Gitweb - Gitweb/commit
gitweb: Make git_search_* subroutines render whole pages
authorJakub Narebski <redacted>
Wed, 22 Jun 2011 15:28:55 +0000 (17:28 +0200)
committerLady <redacted>
Mon, 6 Apr 2026 04:51:31 +0000 (00:51 -0400)
commitd5325663a7cdc64230cabcf41dff257130114ad6312eee12f54af9a9a2bad02f
tree65a1b1994f33ee82c5c162eca787b2ee795b1df32da5753b4e82098cbb6eab5b
parent19ffc2f06610e83269ad9ad795929d84e0fd61d0d0d454233e46582138872495
gitweb: Make git_search_* subroutines render whole pages

Move git_header_html() and git_footer_html() invocation from git_search()
to individual git_search_* subroutines.

While at it, reorganize search-related code a bit, moving invoking of git
commands before any output is generated.

This has the following advantages:

  * gitweb now shows an error page if there was unknown search type
    (evaluate_and_validate_params checks only that it looks sanely);
    remember that we shouldn't call die_error after any output.

  * git_search_message is now safe agains die_error in parse_commits
    (though this is very unlikely).

  * gitweb now can check errors while invoking git commands and show
    error page (again, quite unlikely).

Signed-off-by: Jakub Narebski <redacted>
Signed-off-by: Junio C Hamano <redacted>
gitweb.perl
This page took 0.262843 seconds and 4 git commands to generate.