summaryrefslogtreecommitdiff
path: root/gitweb/gitweb.perl
diff options
context:
space:
mode:
authorJakub Narebski <jnareb@gmail.com>2009-05-11 17:45:11 (GMT)
committerJunio C Hamano <gitster@pobox.com>2009-05-13 17:37:36 (GMT)
commit15c54fe7aa9376de2e03045122723ebde09bfeeb (patch)
tree50ccade908f43ab95691cea3100692f2669c81d7 /gitweb/gitweb.perl
parent095e914281395f6c0529ce39939d804eb2ccec02 (diff)
downloadgit-15c54fe7aa9376de2e03045122723ebde09bfeeb.zip
git-15c54fe7aa9376de2e03045122723ebde09bfeeb.tar.gz
git-15c54fe7aa9376de2e03045122723ebde09bfeeb.tar.bz2
gitweb: Remove unused $hash_base parameter from normalize_link_target
...since it was decided for normalize_link_target to only mangle pathname, and do not try to check if target is present in $hash_base tree, for performance reasons. Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'gitweb/gitweb.perl')
-rwxr-xr-xgitweb/gitweb.perl7
1 files changed, 2 insertions, 5 deletions
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index c72ae10..05702e4 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -3339,10 +3339,7 @@ sub git_get_link_target {
# return target of link relative to top directory (top tree);
# return undef if it is not possible (including absolute links).
sub normalize_link_target {
- my ($link_target, $basedir, $hash_base) = @_;
-
- # we can normalize symlink target only if $hash_base is provided
- return unless $hash_base;
+ my ($link_target, $basedir) = @_;
# absolute symlinks (beginning with '/') cannot be normalized
return if (substr($link_target, 0, 1) eq '/');
@@ -3398,7 +3395,7 @@ sub git_print_tree_entry {
if (S_ISLNK(oct $t->{'mode'})) {
my $link_target = git_get_link_target($t->{'hash'});
if ($link_target) {
- my $norm_target = normalize_link_target($link_target, $basedir, $hash_base);
+ my $norm_target = normalize_link_target($link_target, $basedir);
if (defined $norm_target) {
print " -> " .
$cgi->a({-href => href(action=>"object", hash_base=>$hash_base,