Check if the working directory has modifications to tracked files
()
| 222 | |
| 223 | |
| 224 | def is_dirty() -> bool: |
| 225 | """Check if the working directory has modifications to tracked files""" |
| 226 | proc = subprocess.run("git diff --no-ext-diff --quiet --exit-code".split()) |
| 227 | idx = subprocess.run("git diff --cached --no-ext-diff --quiet --exit-code".split()) |
| 228 | return proc.returncode != 0 or idx.returncode != 0 |
| 229 | |
| 230 | |
| 231 | def describe() -> str: |