mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-21 21:10:56 +01:00
Merge pull request #80 from jstockdale/master
[@epriestley] Sending pull request for https://secure.phabricator.com/D1108
This commit is contained in:
commit
ae1f52642c
1 changed files with 2 additions and 7 deletions
|
@ -26,15 +26,10 @@ class PhabricatorRepositoryGitCommitMessageParserWorker
|
||||||
// NOTE: %B was introduced somewhat recently in git's history, so pull
|
// NOTE: %B was introduced somewhat recently in git's history, so pull
|
||||||
// commit message information with %s and %b instead.
|
// commit message information with %s and %b instead.
|
||||||
list($info) = $repository->execxLocalCommand(
|
list($info) = $repository->execxLocalCommand(
|
||||||
'log -n 1 --pretty=format:%%e%%x00%%an%%x00%%s%%n%%n%%b %s',
|
"log -n 1 --encoding='UTF-8' --pretty=format:%%an%%x00%%s%%n%%n%%b %s",
|
||||||
$commit->getCommitIdentifier());
|
$commit->getCommitIdentifier());
|
||||||
|
|
||||||
list($encoding, $author, $message) = explode("\0", $info);
|
list($author, $message) = explode("\0", $info);
|
||||||
|
|
||||||
if ($encoding != "UTF-8") {
|
|
||||||
$author = mb_convert_encoding($author, 'UTF-8', $encoding);
|
|
||||||
$message = mb_convert_encoding($message, 'UTF-8', $encoding);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Make sure these are valid UTF-8.
|
// Make sure these are valid UTF-8.
|
||||||
$author = phutil_utf8ize($author);
|
$author = phutil_utf8ize($author);
|
||||||
|
|
Loading…
Reference in a new issue