From: Jakub Narebski Date: Thu, 5 Jan 2012 20:26:48 +0000 (+0100) Subject: gitweb: Fix file links in "grep" search X-Git-Tag: v1.7.9-rc2~7^2~1 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/ff7f2185d6e04b7bea66f39ee51d79919ab1279c?hp=ff7f2185d6e04b7bea66f39ee51d79919ab1279c gitweb: Fix file links in "grep" search There were two bugs in generating file links (links to "blob" view), one hidden by the other. The correct way of generating file link is href(action=>"blob", hash_base=>$co{'id'}, file_name=>$file); It was $co{'hash'} (this key does not exist, and therefore this is undef), and 'hash' instead of 'hash_base'. To have this fix applied in single place, this commit also reduces code duplication by saving file link (which is used for line links) in $file_href. Reported-by: Thomas Perl Signed-off-by: Jakub Narebski Signed-off-by: Junio C Hamano ---