Commit ff7f218
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 <th.perl@gmail.com>
Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>1 parent 1327d83 commit ff7f218
1 file changed
+7
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5715 | 5715 | | |
5716 | 5716 | | |
5717 | 5717 | | |
5718 | | - | |
| 5718 | + | |
5719 | 5719 | | |
5720 | 5720 | | |
5721 | 5721 | | |
| |||
5730 | 5730 | | |
5731 | 5731 | | |
5732 | 5732 | | |
| 5733 | + | |
| 5734 | + | |
5733 | 5735 | | |
5734 | | - | |
5735 | | - | |
5736 | | - | |
| 5736 | + | |
5737 | 5737 | | |
5738 | 5738 | | |
5739 | 5739 | | |
| |||
5751 | 5751 | | |
5752 | 5752 | | |
5753 | 5753 | | |
5754 | | - | |
5755 | | - | |
5756 | | - | |
5757 | | - | |
| 5754 | + | |
| 5755 | + | |
| 5756 | + | |
5758 | 5757 | | |
5759 | 5758 | | |
5760 | 5759 | | |
| |||
0 commit comments