From 1d303542235d4f02f09c5cf5b60e67100b01e585 Mon Sep 17 00:00:00 2001 From: epriestley Date: Thu, 13 Mar 2014 17:47:11 -0700 Subject: [PATCH] Fix issue with ref/fixes in commit messages Summary: Fixes T4600. If there's also a revision, the variable "$message" gets overwritten. groan~ Test Plan: Pushed a commit with "Fixes T123" and a revision, saw it parse on the first try. Reviewers: btrahan Reviewed By: btrahan Subscribers: chrisbolt, aran, epriestley Maniphest Tasks: T4600 Differential Revision: https://secure.phabricator.com/D8519 --- .../PhabricatorRepositoryCommitMessageParserWorker.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/applications/repository/worker/commitmessageparser/PhabricatorRepositoryCommitMessageParserWorker.php b/src/applications/repository/worker/commitmessageparser/PhabricatorRepositoryCommitMessageParserWorker.php index 33fe94bc5a..fde7e8568b 100644 --- a/src/applications/repository/worker/commitmessageparser/PhabricatorRepositoryCommitMessageParserWorker.php +++ b/src/applications/repository/worker/commitmessageparser/PhabricatorRepositoryCommitMessageParserWorker.php @@ -128,13 +128,13 @@ abstract class PhabricatorRepositoryCommitMessageParserWorker $actor); if ($committer_name && ($committer_name != $author_name)) { - $message = pht( + $revision_update_comment = pht( 'Closed by commit %s (authored by %s, committed by %s).', $commit_name, $author_name, $committer_name); } else { - $message = pht( + $revision_update_comment = pht( 'Closed by commit %s (authored by %s).', $commit_name, $author_name); @@ -170,7 +170,7 @@ abstract class PhabricatorRepositoryCommitMessageParserWorker ->setIgnoreOnNoEffect(true) ->attachComment( id(new DifferentialTransactionComment()) - ->setContent($message)); + ->setContent($revision_update_comment)); $content_source = PhabricatorContentSource::newForSource( PhabricatorContentSource::SOURCE_DAEMON,