Page MenuHomePhorge

Allow an infinite number of arcpatch_DXXXX_X branches to be created
Needs ReviewPublic

Authored by ncollins on Fri, Nov 12, 20:23.

Details

Reviewers
None
Group Reviewers
Restricted Owners Package(Owns No Changed Paths)
Summary

WIP

Make arcanist follow the zero one infinity rule

Test Plan

WIP

Diff Detail

Repository
rARC Arcanist
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

Owners added a reviewer: Restricted Owners Package.Fri, Nov 12, 20:23

Although there's merit to the "zero, one, infinity" rule, it might not be the best option here. If something goes wrong and $err happens to always be falsy, this will end up in an infinite loop instead of giving a clear error message. There is probably a reasonable finite value (that's greater than 4) which can be chosen as the limit to the number of attempts.

src/workflow/ArcanistPatchWorkflow.php
222

Will this result in "{$base_name}_" rather than "{$base_name}" as the first proposed branch name?

235

This can be just $proposed_suffix++.