From 4230292997cef41ae2ec3259db009ce372b9ae79 Mon Sep 17 00:00:00 2001 From: "Lawrence D'\\''Anna" Date: Sat, 23 Oct 2021 15:01:44 -0400 Subject: [PATCH] Fix incorrect quoting of author in 'arc patch' Summary: Author field is formatted with csprintf, which would be appropriate if the resulting string was concatenated into a shell command as a string -- but because the flags are passed as a vector of strings and not parsed by the shell, this results in extraneous shell quoting making it into to author field. In particular this renders my name as D'\''Anna instead of D'Anna Test Plan: Performed 'arc patch' with and without these changes, confirmed that my apostrophe was no longer mangled by shell quotes in the resulting commit. Reviewers: O1 Blessed Committers, speck Reviewed By: O1 Blessed Committers, speck Subscribers: MacFan4000, Ekubischta, speck, tobiaswiese, valerio.bozzolan Differential Revision: https://we.phorge.it/D25026 --- src/workflow/ArcanistPatchWorkflow.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/workflow/ArcanistPatchWorkflow.php b/src/workflow/ArcanistPatchWorkflow.php index b7938b3c..8c9158dc 100644 --- a/src/workflow/ArcanistPatchWorkflow.php +++ b/src/workflow/ArcanistPatchWorkflow.php @@ -743,7 +743,7 @@ EOTEXT if ($this->shouldCommit()) { $flags = array(); if ($bundle->getFullAuthor()) { - $flags[] = csprintf('--author=%s', $bundle->getFullAuthor()); + $flags[] = sprintf('--author=%s', $bundle->getFullAuthor()); } $commit_message = $this->getCommitMessage($bundle);