com karma: Use author/email format that can be copied and pasted for use in e-mail clients.: lib/Git/PostReceiveHook.php
| From: | Derick Rethans | Date: | Tue, 20 Mar 2012 09:05:49 +0000 |
| Subject: | com karma: Use author/email format that can be copied and pasted for use in e-mail clients.: lib/Git/PostReceiveHook.php | ||
| References: | 1 | Groups: | php.cvs |
| Request: | Send a blank email to php-cvs+get-68044@lists.php.net to get a copy of this message | ||
Commit: f05ac19fc6481815958655f483ef8d0d4fbc3bbe
Author: Derick Rethans(github@derickrethans.nl) Tue, 20 Mar 2012 08:57:53 +0000
Committer: Derick Rethans(github@derickrethans.nl) Tue, 20 Mar 2012 09:05:42 +0000
Parents: 20a4cccd338af8b1e20ceae4339e563907b4195c
Link: http://git.php.net/?p=karma.git;a=commitdiff;h=f05ac19fc6481815958655f483ef8d0d4fbc3bbe
Log:
Use author/email format that can be copied and pasted for use in e-mail clients.
Changed paths:
M lib/Git/PostReceiveHook.php
Diff:
f05ac19fc6481815958655f483ef8d0d4fbc3bbe
diff --git a/lib/Git/PostReceiveHook.php b/lib/Git/PostReceiveHook.php
index 5b31f1e..6fd1a2f 100644
--- a/lib/Git/PostReceiveHook.php
+++ b/lib/Git/PostReceiveHook.php
@@ -151,8 +151,8 @@ class PostReceiveHook extends ReceiveHook
foreach ($revisions as $revision) {
$commitInfo = $this->getCommitInfo($revision);
$logString .= 'Commit: ' . $revision . "\n";
- $logString .= 'Author: ' . $commitInfo['author'] .
'(' . $commitInfo['author_email'] . ') ' .
$commitInfo['author_date'] . "\n";
- $logString .= 'Committer: ' . $commitInfo['committer'] .
'(' . $commitInfo['committer_email'] . ') ' .
$commitInfo['committer_date'] . "\n";
+ $logString .= 'Author: ' . $commitInfo['author'] . '
<' . $commitInfo['author_email'] . '> ' .
$commitInfo['author_date'] . "\n";
+ $logString .= 'Committer: ' . $commitInfo['committer'] .
' <' . $commitInfo['committer_email'] . '> ' .
$commitInfo['committer_date'] . "\n";
$logString .= "Link: http://git.php.net/?p=" . $this->getRepositoryName()
. ";a=commitdiff;h=" . $revision . "\n";
$logString .= "Shortlog: " . $commitInfo['subject'] .
"\n";
$logString .= "\n";
@@ -274,7 +274,7 @@ class PostReceiveHook extends ReceiveHook
if ($info['annotated']) {
$message .= 'Tag: ' . $info['revision'] . "\n";
- $message .= 'Tagger: ' . $info['tagger'] . '(' .
$info['tagger_email'] . ') ' . $info['tagger_date'] .
"\n";
+ $message .= 'Tagger: ' . $info['tagger'] . ' <' .
$info['tagger_email'] . '> ' . $info['tagger_date'] .
"\n";
$message .= "Log:\n" . $info['log'] . "\n";
}
@@ -283,8 +283,8 @@ class PostReceiveHook extends ReceiveHook
$message .= "\n";
$message .= 'Target: ' . $info['target'] . "\n";
- $message .= 'Author: ' . $targetInfo['author'] . '(' .
$targetInfo['author_email'] . ') ' .
$targetInfo['author_date'] . "\n";
- $message .= 'Committer: ' . $targetInfo['committer'] .
'(' . $targetInfo['committer_email'] . ') ' .
$targetInfo['committer_date'] . "\n";
+ $message .= 'Author: ' . $targetInfo['author'] . ' <'
. $targetInfo['author_email'] . '> ' .
$targetInfo['author_date'] . "\n";
+ $message .= 'Committer: ' . $targetInfo['committer'] . '
<' . $targetInfo['committer_email'] . '> ' .
$targetInfo['committer_date'] . "\n";
if ($targetInfo['parents']) $message .= 'Parents: ' .
$targetInfo['parents'] . "\n";
$message .= "Target link: http://git.php.net/?p=" . $this->getRepositoryName()
. ";a=commitdiff;h=" . $info['target'] . "\n";
$message .= "Target log:\n" . $targetInfo['log'] . "\n";
@@ -505,8 +505,8 @@ class PostReceiveHook extends ReceiveHook
$message = '';
$message .= 'Commit: ' . $revision . "\n";
- $message .= 'Author: ' . $info['author'] . '(' .
$info['author_email'] . ') ' . $info['author_date'] .
"\n";
- $message .= 'Committer: ' . $info['committer'] . '(' .
$info['committer_email'] . ') ' . $info['committer_date'] .
"\n";
+ $message .= 'Author: ' . $info['author'] . ' <' .
$info['author_email'] . '> ' . $info['author_date'] .
"\n";
+ $message .= 'Committer: ' . $info['committer'] . ' <' .
$info['committer_email'] . '> ' . $info['committer_date'] .
"\n";
if ($info['parents']) $message .= 'Parents: ' .
$info['parents'] . "\n";
$message .= "\n" . "Link: http://git.php.net/?p=" . $this->getRepositoryName()
. ";a=commitdiff;h=" . $revision . "\n";