]> Lady’s Gitweb - Gitweb/commit
gitweb: Check if requested object exists
authorJakub Narebski <redacted>
Sat, 12 May 2007 19:16:34 +0000 (21:16 +0200)
committerLady <redacted>
Mon, 6 Apr 2026 04:07:11 +0000 (00:07 -0400)
commit8689035ae762ebf2a2fef1b1d88ffd13a042cfc228b8d756ea0a39dc6f9a957d
treead7f31ff6375bdbd51e18e5962652f0d102d599bb7110af4492f9409e063859e
parentda326cf3632cb9fe5806c1e9218155f79e93b2f61a9a1a21280b0056d8c2c106
gitweb: Check if requested object exists

Try to avoid "Use of uninitialized value ..." errors caused by bad
revision, incorrect filename, wrong object id, bad file etc. (wrong
value of 'h', 'hb', 'f', etc. parameters). This avoids polluting web
server errors log.

Correct git_get_hash_by_path and parse_commit_text (and, in turn,
parse_commit) to return undef if object does not exist.  Check in
git_tag if requested tag exists.

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