This turns the existing check into an assert. Otherwise, the previous code may return an arbitrary repo mode (bare) on failure.
This turns the existing check into an assert. Otherwise, the previous code may return an arbitrary repo mode (bare) on failure.