]> khamidou — GitHub mirrors - arcanist.git/commit
Fix an issue where branches at the same commit race to destruction in "arc branch"
authorepriestley <git@epriestley.com>
Wed, 8 Aug 2012 01:21:32 +0000 (18:21 -0700)
committerepriestley <git@epriestley.com>
Wed, 8 Aug 2012 01:21:32 +0000 (18:21 -0700)
commitcb5cfb28cdbabb7bf2fbe9226f721a6c1ea08500
treef387e34217fa7f9854faa7c8ca01819c63c2c541
parentfae2adba9ee93f79ec8d39c1194aea4f972e9f34
Fix an issue where branches at the same commit race to destruction in "arc branch"

Summary:
If two branches have the same HEAD, they currently race to overwrite each other in $commit_map.

We don't need to return a map indexed by commit since nothing ever reads the keys out of it. Just update $branches in place.

Test Plan: With two branches at the same HEAD, ran "arc branch". Saw both branches in output.

Reviewers: vrana, btrahan

Reviewed By: btrahan

CC: aran
Differential Revision: https://secure.phabricator.com/D3188
src/workflow/ArcanistBranchWorkflow.php