## Lesson — Filter ignored patterns before checking for an empty diff

**Tags:** git, validation, logic-flow

Filter ignored patterns before checking for an empty diff to ensure branch-diff fallbacks trigger correctly when only ignored files change. Checking after the emptiness check causes the tool to perceive a non-empty diff but scan zero content, resulting in a silent pass.
