From: Eric Wong Date: Mon, 4 Jan 2016 21:31:56 +0000 (+0000) Subject: repobrowse: log: trim down unnecessary links X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=82b166afecd7a3b2df220200c9a47b2d8fdfea5e;p=thirdparty%2Fpublic-inbox.git repobrowse: log: trim down unnecessary links We do not need to show links to follow a commit if its parents exist, since we will show unfollowed parents at the end of the commit. --- diff --git a/lib/PublicInbox/RepoBrowseGitLog.pm b/lib/PublicInbox/RepoBrowseGitLog.pm index 8a9ad3cb1..9192c7fc1 100644 --- a/lib/PublicInbox/RepoBrowseGitLog.pm +++ b/lib/PublicInbox/RepoBrowseGitLog.pm @@ -58,7 +58,7 @@ sub git_log_stream { my $rel = $req->{relcmd}; $fh->write('' . PublicInbox::Hval::STYLE . "$desc
$desc\n\n".
-		qq!follow log\t$x\n!);
+		qq!commit\t\t$x\n!);
 	$fh->write($showmsg ? '
' : "\n"); my %acache; local $/ = "\0\0\n"; @@ -82,18 +82,11 @@ sub git_log_stream { $b =~ s/\s*\z//s; my $ah = $acache{$an} ||= utf8_html($an); - my $x = "
";
-			if (@p && $nr) {
-				$x .= qq($id);
-			} else {
-				$x .= $id;
-			}
-			my $nl = $b eq '' ? '' : "\n";
+			my $x = "
$id";
+			my $nl = $b eq '' ? '' : "\n"; # empty bodies :<
 			$b = $x . '  
' .
 				"$s\n- $ah @ $ai\n$nl" .
 				utf8_html($b) . '
'; - } elsif (@p && $nr) { - $b = qq($id\t$s\n); } else { $b = qq($id\t$s\n); } @@ -115,7 +108,7 @@ sub git_log_stream { if ($np == 0) { $foot .= "No commits follow"; } elsif ($np > 1) { - $foot .= "Parent commits to follow (multiple choice):\n"; + $foot .= "Unseen parent commits to follow (multiple choice):\n"; } else { $foot .= "Next parent to follow:\n"; }