git tuning, complexity in isValid