From: epriestley Date: Thu, 10 Jul 2014 14:56:35 +0000 (-0700) Subject: Parameterize `@{upstream}` in arc to fix Windows X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=0be983a7a334ab41d7c918e94ca46a8aafb55a44;p=arcanist.git 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 --- 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(