Page MenuHomePhabricator

Replace magical "branch" behavior in "diffusion.branchquery" with an explicit "patterns"

Authored by epriestley on Nov 2 2018, 3:18 AM.



See PHI958. Ref T13210. Previously, see PHI720.

The use case for the magic in PHI720 involves multiple patterns, and no parameter can be passed to branch that will result in multiple patterns being passed to git.

Replace the implicit magic with an explicit patterns parameter.

This whole thing is a bit shaky but probably isn't hurting anything.

Test Plan
  • Ran query with no patterns.
  • Ran query with invalid patterns, got readable error.
  • Ran query with various valid patterns (plain branch name, globs with "?" and "*"), got sensible results.

Diff Detail

rP Phabricator
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

epriestley created this revision.Nov 2 2018, 3:18 AM
epriestley requested review of this revision.Nov 2 2018, 3:19 AM
amckinley accepted this revision.Nov 2 2018, 6:28 PM
This revision is now accepted and ready to land.Nov 2 2018, 6:28 PM
This revision was automatically updated to reflect the committed changes.