From 3adb3d824864804a357b68dd33f9c2c973742174 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Fri, 17 Feb 2017 23:40:37 +0000 Subject: repobrowse: minor style cleanups Avoid using '=>' arrow notation for arrays and array references, it is confusing and more verbose. Additionally, combine "use constant" statements when possible. --- lib/PublicInbox/RepoGitCommit.pm | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'lib/PublicInbox/RepoGitCommit.pm') diff --git a/lib/PublicInbox/RepoGitCommit.pm b/lib/PublicInbox/RepoGitCommit.pm index 1a10b13c..2d4234cc 100644 --- a/lib/PublicInbox/RepoGitCommit.pm +++ b/lib/PublicInbox/RepoGitCommit.pm @@ -20,12 +20,13 @@ use PublicInbox::RepoGit qw(git_unquote git_commit_title); use PublicInbox::RepoGitDiffCommon; use PublicInbox::Qspawn; -use constant GIT_FMT => '--pretty=format:'.join('%n', - '%H', '%h', '%s', '%an <%ae>', '%ai', '%cn <%ce>', '%ci', - '%t', '%p', '%D', '%b%x00'); - -use constant CC_EMPTY => " This is a merge, and the combined diff is empty.\n"; -use constant CC_MERGE => " This is a merge, showing combined diff:\n\n"; +use constant { + GIT_FMT => '--pretty=format:'.join('%n', + '%H', '%h', '%s', '%an <%ae>', '%ai', '%cn <%ce>', '%ci', + '%t', '%p', '%D', '%b%x00'), + CC_EMPTY => " This is a merge, and the combined diff is empty.\n", + CC_MERGE => " This is a merge, showing combined diff:\n\n" +}; sub commit_header { my ($self, $req) = @_; @@ -155,7 +156,7 @@ sub git_commit_404 { $x .= "$try the latest commit in HEAD\n"; $x .= ''; - [404, ['Content-Type'=>'text/html'], [ $x ]]; + [404, ['Content-Type', 'text/html'], [ $x ]]; } # FIXME: horrifically expensive... -- cgit v1.2.3-24-ge0c7