add support for branches and other refs