1
0
Fork 0
mirror of https://we.phorge.it/source/arcanist.git synced 2024-11-22 06:42:41 +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:
epriestley 2014-07-10 07:56:35 -07:00
parent f4615cd86b
commit 0be983a7a3

View file

@ -279,7 +279,8 @@ final class ArcanistGitAPI extends ArcanistRepositoryAPI {
if (!$default_relative) {
list($err, $upstream) = $this->execManualLocal(
"rev-parse --abbrev-ref --symbolic-full-name '@{upstream}'");
'rev-parse --abbrev-ref --symbolic-full-name %s',
'@{upstream}');
if (!$err) {
$default_relative = trim($upstream);
@ -1164,7 +1165,8 @@ final class ArcanistGitAPI extends ArcanistRepositoryAPI {
break;
case 'upstream':
list($err, $upstream) = $this->execManualLocal(
"rev-parse --abbrev-ref --symbolic-full-name '@{upstream}'");
'rev-parse --abbrev-ref --symbolic-full-name %s',
'@{upstream}');
if (!$err) {
$upstream = rtrim($upstream);
list($upstream_merge_base) = $this->execxLocal(