diff options
author | Eric Wong <e@80x24.org> | 2016-01-18 07:29:04 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2016-04-05 18:58:27 +0000 |
commit | b89e53a37e14f5f659c94f8c880e2cf4b7efe1b4 (patch) | |
tree | a0562b602a400c13428a9a61e50ecc600eca15a6 /lib/PublicInbox/RepobrowseGitSummary.pm | |
parent | 3a188af7da247117763fc81a9bd9633e2b85a772 (diff) | |
download | public-inbox-b89e53a37e14f5f659c94f8c880e2cf4b7efe1b4.tar.gz |
Oops, forgot about this old command :x
Diffstat (limited to 'lib/PublicInbox/RepobrowseGitSummary.pm')
-rw-r--r-- | lib/PublicInbox/RepobrowseGitSummary.pm | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/PublicInbox/RepobrowseGitSummary.pm b/lib/PublicInbox/RepobrowseGitSummary.pm index db601ad9..0dffd5cc 100644 --- a/lib/PublicInbox/RepobrowseGitSummary.pm +++ b/lib/PublicInbox/RepobrowseGitSummary.pm @@ -29,7 +29,7 @@ sub emit_summary { # n.b. we would use %(HEAD) in for-each-ref --format if we could # rely on git 1.9.0+, but it's too soon for that in early 2016... - chomp(my $head_ref = $git->qx(qw(rev-parse HEAD~0))); + chomp(my $head_ref = $git->qx(qw(symbolic-ref HEAD))); my $refs = $git->popen(qw(for-each-ref --sort=-creatordate), EACH_REF_FMT, "--count=$count", @@ -43,6 +43,7 @@ sub emit_summary { my $rel = $req->{relcmd}; foreach (<$refs>) { my ($ref, $type, $hex, $date, $s) = split(' ', $_, 5); + my $x = $ref eq $head_ref ? ' (HEAD)' : ''; $ref =~ s!\Arefs/(?:heads|tags)/!!; $ref = PublicInbox::Hval->utf8($ref); my $h = $ref->as_html; @@ -60,7 +61,6 @@ sub emit_summary { next; } chomp $s; - my $x = $hex eq $head_ref ? ' (HEAD)' : ''; $fh->write(qq(<tr><td><tt><a\nhref="$ref">$h</a>$x</tt></td>) . qq(<td><tt>$date <a\nhref="$sref">) . utf8_html($s) . '</a></tt></td></tr>'); |