diff --git a/src/workflow/ArcanistBaseWorkflow.php b/src/workflow/ArcanistBaseWorkflow.php index 3e9ade25..1b9cccd1 100644 --- a/src/workflow/ArcanistBaseWorkflow.php +++ b/src/workflow/ArcanistBaseWorkflow.php @@ -40,6 +40,8 @@ abstract class ArcanistBaseWorkflow { const COMMIT_ALLOW = 1; const COMMIT_ENABLE = 2; + const AUTO_COMMIT_TITLE = 'Automatic commit by arc'; + private $commitMode = self::COMMIT_DISABLE; private $shouldAmend; @@ -827,7 +829,7 @@ abstract class ArcanistBaseWorkflow { $commit = head($api->getLocalCommitInformation()); $api->amendCommit($commit['message']); } else if ($api->supportsRelativeLocalCommits()) { - $api->doCommit(''); + $api->doCommit(self::AUTO_COMMIT_TITLE); } } } @@ -865,7 +867,7 @@ abstract class ArcanistBaseWorkflow { $known_commits = $this->getConduit()->callMethodSynchronous( 'diffusion.getcommits', array('commits' => array('r'.$callsign.$commit['commit']))); - if ($known_commits) { + if (ifilter($known_commits, 'error', $negate = true)) { return false; } } diff --git a/src/workflow/ArcanistDiffWorkflow.php b/src/workflow/ArcanistDiffWorkflow.php index aefe6fc5..6f09a6c7 100644 --- a/src/workflow/ArcanistDiffWorkflow.php +++ b/src/workflow/ArcanistDiffWorkflow.php @@ -1933,6 +1933,9 @@ EOTEXT $messages = array(); foreach ($local as $hash => $info) { $text = $info['message']; + if (trim($text) == self::AUTO_COMMIT_TITLE) { + continue; + } $obj = ArcanistDifferentialCommitMessage::newFromRawCorpus($text); $messages[$hash] = $obj; } @@ -2163,6 +2166,9 @@ EOTEXT foreach ($usable as $message) { // Pick the first line out of each message. $text = trim($message); + if ($text == self::AUTO_COMMIT_TITLE) { + continue; + } $text = head(explode("\n", $text)); $default[] = ' - '.$text."\n"; }