Commit: eb514083bf2a6ddaa0f2404da3d4347d2747a22e Author: Derick Rethans(git...@derickrethans.nl) Tue, 20 Mar 2012 07:50:06 +0000 Committer: Derick Rethans(git...@derickrethans.nl) Tue, 20 Mar 2012 07:54:58 +0000 Parents: 42d233ae4752adbce2709553cef0cd456b92a2e0
Link: http://git.php.net/?p=karma.git;a=commitdiff;h=eb514083bf2a6ddaa0f2404da3d4347d2747a22e Log: Don't use an email prefix unless specifically configured. This gets rid of the superfluous "[git] " in every mail subject to PHP-CVS. Changed paths: M hooks/post-receive.mail M lib/Git/PostReceiveHook.php Diff: eb514083bf2a6ddaa0f2404da3d4347d2747a22e diff --git a/hooks/post-receive.mail b/hooks/post-receive.mail index 7d47619..de24b77 100755 --- a/hooks/post-receive.mail +++ b/hooks/post-receive.mail @@ -30,7 +30,10 @@ include 'Git/PostReceiveHook.php'; $recipients = exec('git config hooks.mailinglist'); -$emailPrefix = exec('git config hooks.emailprefix') ?: '[git]'; +$emailPrefix = exec('git config hooks.emailprefix'); +if ($emailprefix != '') { + $emailprefix . ' '; +} $user = null; if (getenv('REMOTE_USER')) { diff --git a/lib/Git/PostReceiveHook.php b/lib/Git/PostReceiveHook.php index bd3be9b..4aec7b7 100644 --- a/lib/Git/PostReceiveHook.php +++ b/lib/Git/PostReceiveHook.php @@ -229,7 +229,7 @@ class PostReceiveHook extends ReceiveHook $mail = new \Mail(); - $mail->setSubject($this->emailPrefix . ' branch ' . $this->getRepositoryName() . ': ' . $status[$changeType] . ' branch ' . $shortname); + $mail->setSubject($this->emailPrefix . 'branch ' . $this->getRepositoryName() . ': ' . $status[$changeType] . ' branch ' . $shortname); $message = 'Branch ' . $shortname . ' in ' . $this->getRepositoryName() . ' was ' . $status[$changeType] . 'd' . "\n"; $message .= 'Date: ' . date('r') . "\n"; @@ -567,7 +567,7 @@ class PostReceiveHook extends ReceiveHook $diff = \Git::gitExec('diff-tree -c -p %s', escapeshellarg($revision)); $mail = new \Mail(); - $mail->setSubject($this->emailPrefix . ' commit ' . $this->getRepositoryName() . ': ' . implode(' ', array_keys($paths))); + $mail->setSubject($this->emailPrefix . 'commit ' . $this->getRepositoryName() . ': ' . implode(' ', array_keys($paths))); $message = ''; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php