From: Bob Trahan Date: Tue, 14 Feb 2012 00:42:24 +0000 (-0800) Subject: Make arcanist-created branch names immune to potential git sha1 conflicts X-Git-Tag: conduit-4~150 X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=b24c228b5c7fdb978dc83e27f46797ef2e89be1b;p=arcanist.git Make arcanist-created branch names immune to potential git sha1 conflicts Summary: T854 is hilarious. seriously, what are the odds? Test Plan: ran arc patch a few times in a row with the same DX and verified branches were made with expected, differing names Reviewers: epriestley, fratrik CC: aran, epriestley Maniphest Tasks: T854 Differential Revision: https://secure.phabricator.com/D1605 --- diff --git a/src/workflow/patch/ArcanistPatchWorkflow.php b/src/workflow/patch/ArcanistPatchWorkflow.php index 38c89b87..430f4cdb 100644 --- a/src/workflow/patch/ArcanistPatchWorkflow.php +++ b/src/workflow/patch/ArcanistPatchWorkflow.php @@ -213,10 +213,9 @@ EOTEXT $branch_name = null; $repository_api = $this->getRepositoryAPI(); $revision_id = $bundle->getRevisionID(); + $base_name = "arcpatch"; if ($revision_id) { - $base_name = "D{$revision_id}"; - } else { - $base_name = "Arcanist-created-branch"; + $base_name .= "-D{$revision_id}"; } $suffixes = array(null, '-1', '-2', '-3');