How to set denyNonFastforwards=true for unprotected branches only

How to set denyNonFastforwards=true for unprotected branches only?