diff options
author | Eric Wong <e@80x24.org> | 2017-02-17 23:40:37 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2017-02-17 23:41:34 +0000 |
commit | 3adb3d824864804a357b68dd33f9c2c973742174 (patch) | |
tree | dd403014d2b9248be2f1d44bb957b742f7ef5d72 /lib/PublicInbox/RepoGitCommit.pm | |
parent | 7ca9df837d6b6ac060a9f321fe87900218ef7e88 (diff) | |
download | public-inbox-3adb3d824864804a357b68dd33f9c2c973742174.tar.gz |
Avoid using '=>' arrow notation for arrays and array references, it is confusing and more verbose. Additionally, combine "use constant" statements when possible.
Diffstat (limited to 'lib/PublicInbox/RepoGitCommit.pm')
-rw-r--r-- | lib/PublicInbox/RepoGitCommit.pm | 15 |
1 files changed, 8 insertions, 7 deletions
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 .= "<a\nhref=\"$pfx\">$try the latest commit in HEAD</a>\n"; $x .= '</pre></body>'; - [404, ['Content-Type'=>'text/html'], [ $x ]]; + [404, ['Content-Type', 'text/html'], [ $x ]]; } # FIXME: horrifically expensive... |