Unify --ignore-dir and --noignore-dir implementations