Changeset View
Changeset View
Standalone View
Standalone View
src/workflow/ArcanistDiffWorkflow.php
| Show First 20 Lines • Show All 2,661 Lines • ▼ Show 20 Lines | private function pushChangesToStagingArea($id) { | ||||
| $commit = $api->getHeadCommit(); | $commit = $api->getHeadCommit(); | ||||
| $prefix = idx($staging, 'prefix', 'phabricator'); | $prefix = idx($staging, 'prefix', 'phabricator'); | ||||
| $tag = $prefix.'/diff/'.$id; | $tag = $prefix.'/diff/'.$id; | ||||
| $this->writeOkay( | $this->writeOkay( | ||||
| pht('PUSH STAGING'), | pht('PUSH STAGING'), | ||||
| pht('Pushing changes to staging area...')); | pht('Pushing changes to staging area...')); | ||||
| $push_flags = array(); | |||||
| if (version_compare($api->getGitVersion(), '1.8.2', '>=')) { | |||||
| $push_flags[] = '--no-verify'; | |||||
| } | |||||
| $err = phutil_passthru( | $err = phutil_passthru( | ||||
| 'git push --no-verify -- %s %s:refs/tags/%s', | 'git push %Ls -- %s %s:refs/tags/%s', | ||||
| $push_flags, | |||||
| $staging_uri, | $staging_uri, | ||||
| $commit, | $commit, | ||||
| $tag); | $tag); | ||||
| if ($err) { | if ($err) { | ||||
| $this->writeWarn( | $this->writeWarn( | ||||
| pht('STAGING FAILED'), | pht('STAGING FAILED'), | ||||
| pht('Unable to push changes to the staging area.')); | pht('Unable to push changes to the staging area.')); | ||||
| ▲ Show 20 Lines • Show All 124 Lines • Show Last 20 Lines | |||||