2c2e13e
switch to distprefix, implement branch support, refactor the logic to be simpler to understand and maintain