Add ability to set the branch for source repos
dshoreman opened this issue · comments
Dave Shoreman commented
Cloning the source repo works well when you're using master, but if you want to use any other branch you're out of luck.
Add some logic that gets a list of branches on the repo which can be shown in a dropdown to the right of the source repo input. For the list, use git ls-remote <repo> 'refs/heads/*'
to just get branches. Could be nice to get tags too though with 'refs/tags/*'
.
If branch is set, the site update handler should append -b <branch>
to the clone command. We'll probably need to checkout before/after pulling when it already exists too, just in case the branch gets changed.