Right to the point since we are overloading the same enum (for existing and demanding repo type).   Hence, Not Setup != Null.    However, given the existing check is only done in the EnsureRepository(repoType), I solve it by introducing a new routine to TryGetExistingRepositoryType.

        private bool TryGetExistingRepositoryType(out RepositoryType repositoryType)
        {
            // if defined, this favors the null setting (user explicit action) over actual repo.
            if (IsNullRepository)
            {
                repositoryType = RepositoryType.None;
                return true;
            }
            else if (IsGitRepository)
            {
                repositoryType = RepositoryType.Git;
                return true;
            }
            else if (IsHgRepository)
            {
                repositoryType = RepositoryType.Mercurial;
                return true;
            }

            repositoryType = default(RepositoryType);
            return false;
        }

And the validation logic is simplified to just ..

 
        public IRepository EnsureRepository(RepositoryType repositoryType)
        {
            // Validate if conflicting with existing repository
            RepositoryType existingType;
            if (TryGetExistingRepositoryType(out existingType) && existingType != repositoryType)
            {
                throw new InvalidOperationException(String.Format(CultureInfo.CurrentCulture, Resources.Error_MismatchRepository, repositoryType, existingType, _environment.RepositoryPath));
            }


Make sense?