summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: cc1bf97)
raw | patch | inline | side by side (parent: cc1bf97)
author | Luben Tuikov <ltuikov@yahoo.com> | |
Sun, 23 Jul 2006 21:17:48 +0000 (14:17 -0700) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Tue, 25 Jul 2006 01:21:53 +0000 (18:21 -0700) |
Eliminate git_read_blame_line() -- move that code inline and
optimize it.
Signed-off-by: Luben Tuikov <ltuikov@yahoo.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
optimize it.
Signed-off-by: Luben Tuikov <ltuikov@yahoo.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
gitweb/gitweb.cgi | patch | blob | history |
diff --git a/gitweb/gitweb.cgi b/gitweb/gitweb.cgi
index 16340f2106162bffa1849e75c8fcc980132d42d1..7fbfc0d22671d07f49c38a3372a0148d1b861294 100755 (executable)
--- a/gitweb/gitweb.cgi
+++ b/gitweb/gitweb.cgi
git_footer_html();
}
-sub git_read_blame_line {
- my %bl;
- $_ = shift;
-
- ($bl{'hash'}, $bl{'lineno'}, $bl{'data'}) = /^([0-9a-fA-F]{40}).*?(\d+)\)\s{1}(\s*.*)/;
-
- return %bl;
-}
-
sub git_blame2 {
my $fd;
my $ftype;
print "<div class=\"page_body\">\n";
print "<table class=\"blame\">\n";
print "<tr><th>Commit</th><th>Line</th><th>Data</th></tr>\n";
- while (my $line = <$fd>) {
- my %blame_line = git_read_blame_line($line);
- my $full_rev = $blame_line{'hash'};
+ while (<$fd>) {
+ /^([0-9a-fA-F]{40}).*?(\d+)\)\s{1}(\s*.*)/;
+ my $full_rev = $1;
my $rev = substr($full_rev, 0, 8);
- my $lineno = $blame_line{'lineno'};
- my $data = $blame_line{'data'};
+ my $lineno = $2;
+ my $data = $3;
if (!defined $last_rev) {
$last_rev = $full_rev;