Reducing complexity of Branch#find_source_branch_from_params