mirror of
https://we.phorge.it/source/arcanist.git
synced 2024-11-25 16:22:42 +01:00
Parameterize @{upstream}
in arc to fix Windows
Summary: We manually quote this in a couple of places. That works fine on Lunix, but does not work on Windows. Instead, explicitly parameterize the command so the correct quoting rules are applied for the OS. Test Plan: See IRC; windows user had issues fixed by this. `arc:upstream` still works locally. Reviewers: btrahan, chad Reviewed By: chad Subscribers: epriestley Differential Revision: https://secure.phabricator.com/D9868
This commit is contained in:
parent
f4615cd86b
commit
0be983a7a3
1 changed files with 4 additions and 2 deletions
|
@ -279,7 +279,8 @@ final class ArcanistGitAPI extends ArcanistRepositoryAPI {
|
||||||
|
|
||||||
if (!$default_relative) {
|
if (!$default_relative) {
|
||||||
list($err, $upstream) = $this->execManualLocal(
|
list($err, $upstream) = $this->execManualLocal(
|
||||||
"rev-parse --abbrev-ref --symbolic-full-name '@{upstream}'");
|
'rev-parse --abbrev-ref --symbolic-full-name %s',
|
||||||
|
'@{upstream}');
|
||||||
|
|
||||||
if (!$err) {
|
if (!$err) {
|
||||||
$default_relative = trim($upstream);
|
$default_relative = trim($upstream);
|
||||||
|
@ -1164,7 +1165,8 @@ final class ArcanistGitAPI extends ArcanistRepositoryAPI {
|
||||||
break;
|
break;
|
||||||
case 'upstream':
|
case 'upstream':
|
||||||
list($err, $upstream) = $this->execManualLocal(
|
list($err, $upstream) = $this->execManualLocal(
|
||||||
"rev-parse --abbrev-ref --symbolic-full-name '@{upstream}'");
|
'rev-parse --abbrev-ref --symbolic-full-name %s',
|
||||||
|
'@{upstream}');
|
||||||
if (!$err) {
|
if (!$err) {
|
||||||
$upstream = rtrim($upstream);
|
$upstream = rtrim($upstream);
|
||||||
list($upstream_merge_base) = $this->execxLocal(
|
list($upstream_merge_base) = $this->execxLocal(
|
||||||
|
|
Loading…
Reference in a new issue