Update the code for getting the ref branches.