]> khamidou — GitHub mirrors - arcanist.git/commitdiff
Make arcanist-created branch names immune to potential git sha1 conflicts
authorBob Trahan <bob.trahan@gmail.com>
Tue, 14 Feb 2012 00:42:24 +0000 (16:42 -0800)
committerBob Trahan <bob.trahan@gmail.com>
Tue, 14 Feb 2012 23:55:27 +0000 (15:55 -0800)
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

src/workflow/patch/ArcanistPatchWorkflow.php

index 38c89b87a92a51ee9717ce9d52d728023f66275d..430f4cdb1c2fd15f894090d0d665fbdaec22fcae 100644 (file)
@@ -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');