Nicer error message if a branch is not set