Differential D21511 Diff 51201 src/applications/repository/engine/PhabricatorRepositoryRefEngine.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/repository/engine/PhabricatorRepositoryRefEngine.php
| Show First 20 Lines • Show All 477 Lines • ▼ Show 20 Lines | switch ($vcs) { | ||||
| $ref_list[] = $new_head; | $ref_list[] = $new_head; | ||||
| foreach ($all_closing_heads as $old_head) { | foreach ($all_closing_heads as $old_head) { | ||||
| $ref_list[] = '^'.$old_head; | $ref_list[] = '^'.$old_head; | ||||
| } | } | ||||
| $ref_list[] = '--'; | $ref_list[] = '--'; | ||||
| $ref_list = implode("\n", $ref_list)."\n"; | $ref_list = implode("\n", $ref_list)."\n"; | ||||
| $future = $this->getRepository()->getLocalCommandFuture( | $future = $this->getRepository()->getLocalCommandFuture( | ||||
| 'log --format=%s --stdin', | 'log %s --stdin --', | ||||
| '%H'); | '--format=%H'); | ||||
| list($stdout) = $future | list($stdout) = $future | ||||
| ->write($ref_list) | ->write($ref_list) | ||||
| ->resolvex(); | ->resolvex(); | ||||
| } else { | } else { | ||||
| list($stdout) = $this->getRepository()->execxLocalCommand( | list($stdout) = $this->getRepository()->execxLocalCommand( | ||||
| 'log --format=%s %s', | 'log %s %s --', | ||||
| '%H', | '--format=%H', | ||||
| $new_head); | gitsprintf('%s', $new_head)); | ||||
| } | } | ||||
| $stdout = trim($stdout); | $stdout = trim($stdout); | ||||
| if (!strlen($stdout)) { | if (!strlen($stdout)) { | ||||
| return array(); | return array(); | ||||
| } | } | ||||
| return phutil_split_lines($stdout, $retain_newlines = false); | return phutil_split_lines($stdout, $retain_newlines = false); | ||||
| default: | default: | ||||
| ▲ Show 20 Lines • Show All 217 Lines • Show Last 20 Lines | |||||