From 0be983a7a334ab41d7c918e94ca46a8aafb55a44 Mon Sep 17 00:00:00 2001 From: epriestley Date: Thu, 10 Jul 2014 07:56:35 -0700 Subject: [PATCH] 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 --- src/repository/api/ArcanistGitAPI.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/repository/api/ArcanistGitAPI.php b/src/repository/api/ArcanistGitAPI.php index 5f4d180b..e9f05f58 100644 --- a/src/repository/api/ArcanistGitAPI.php +++ b/src/repository/api/ArcanistGitAPI.php @@ -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( -- 2.43.0