summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: f6375b2)
raw | patch | inline | side by side (parent: f6375b2)
author | Kay Sievers <kay.sievers@suse.de> | |
Sun, 7 Aug 2005 18:28:42 +0000 (20:28 +0200) | ||
committer | Kay Sievers <kay.sievers@suse.de> | |
Sun, 7 Aug 2005 18:28:42 +0000 (20:28 +0200) |
gitweb.cgi | patch | blob | history |
diff --git a/gitweb.cgi b/gitweb.cgi
index 6c4ed7472acd6253b2c00dab87a6db267a87ea9a..30a62529003676a23649831c9a5e634048a053ae 100755 (executable)
--- a/gitweb.cgi
+++ b/gitweb.cgi
use Fcntl ':mode';
my $cgi = new CGI;
-my $version = "233";
+my $version = "234";
my $my_url = $cgi->url();
my $my_uri = $cgi->url(-absolute => 1);
my $rss_link = "";
}
}
+sub format_log_line_html {
+ my $line = shift;
+
+ $line = escapeHTML($line);
+ $line =~ s/ / /g;
+ if ($line =~ m/([0-9a-fA-F]{40})/) {
+ my $hash_text = $1;
+ if (git_get_type($hash_text) eq "commit") {
+ my $link = $cgi->a({-class => "list", -href => "$my_uri?p=$project;a=commit;h=$hash_text"}, $hash_text);
+ $line =~ s/$hash_text/$link/;
+ }
+ }
+ return $line;
+}
+
sub date_str {
my $epoch = shift;
my $tz = shift || "-0000";
} else {
$empty = 0;
}
- print escapeHTML($line) . "<br/>\n";
+ print format_log_line_html($line) . "<br/>\n";
}
if (!$empty) {
print "<br/>\n";
print "<span style=\"color: #888888\">" . escapeHTML($line) . "</span><br/>\n";
} else {
$signed = 0;
- $line = escapeHTML($line);
- $line =~ s/ / /g;
- print "$line<br/>\n";
+ print format_log_line_html($line) . "<br/>\n";
}
}
print "</div>\n";
} else {
$empty = 0;
}
- $line = escapeHTML($line);
- $line =~ s/ / /g;
- print "$line<br/>\n";
+ print format_log_line_html($line) . "<br/>\n";
}
print "<br/>\n";
foreach my $line (@difftree) {