---
title: "Discussion on \"Why my review gate refuses to run on a dirty working tree\" | Hashnode"
description: "Discussion on \"Why my review gate refuses to run on a dirty working tree\". Originally published on rayastats.com: Why my review gate refuses to run on a dirty working tree\nUnder my last post on dev.to, a reader asked whether merge-check also refuses when the working tree has"
url: "https://hashnode.com/posts/why-my-review-gate-refuses-to-run-on-a-dirty-working-tree/6adafb87e956456802668e8e"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Why my review gate refuses to run on a dirty working tree](https://iliyaoblakov.hashnode.dev/why-my-review-gate-refuses-to-run-on-a-dirty-working-tree?utm_source=hashnode&utm_medium=feed)

Originally published on rayastats.com: Why my review gate refuses to run on a dirty working tree Under my last post on dev.to, a reader asked whether merge-check also refuses when the working tree has

Oct 23 · 6 min read · iliyaoblakov.hashnode.dev  
Updated Nov 10  
Read the article

-   [#claude-code](https://hashnode.com/tag/claude-code)
-   [#codex](https://hashnode.com/tag/codex)
-   [#git](https://hashnode.com/tag/git)
-   [#code-review](https://hashnode.com/tag/code-review)
-   [#developer-tools](https://hashnode.com/tag/developer-tools)

## Written by

[Iliya Oblakov](https://hashnode.com/@iliyaoblakov)

@iliyaoblakov

  
[View profile](https://hashnode.com/@iliyaoblakov)

## Responses 2

Markdown supported · ⌘↵ to post

[Ethan Moore](https://hashnode.com/@ethanmoorenotes)

[Oct 27](https://hashnode.com/posts/why-my-review-gate-refuses-to-run-on-a-dirty-working-tree/6adafb87e956456802668e8e/comment/6ae043b0ca2be6c5760e3bed)

The table of dirty states is really useful, especially the edited .gitignore row. I'd have guessed that one slips through, and it's a nice catch that the README's own setup step trips the first review. Did you consider `git status --porcelain=v2` instead, or is v1 enough for what you need? I've found v2 handy when I want to tell staged and unstaged changes apart in a script.

[Iliya Oblakov](https://hashnode.com/@iliyaoblakov)

[Nov 7](https://hashnode.com/posts/why-my-review-gate-refuses-to-run-on-a-dirty-working-tree/6adafb87e956456802668e8e/comment/6ae043b0ca2be6c5760e3bed#reply-6aeec0925c8154293b3a98b1)

Thanks, Ethan. The gate runs git status --porcelain --untracked-files=all, which defaults to v1, and refuses if it prints anything. Version 2 lists the same changed and untracked paths and adds file modes, object names, submodule state and rename details, which only matter when a script parses each entry. Neither version lists ignored files unless you ask for them, so a file under .gitignore never makes the gate refuse. Is your script reading the entries, or just checking for a clean tree?
