Common errors
”cannot access” errors
This error occurs when Dirty cannot access the specified path:Causes and solutions
Causes and solutions
Non-existent pathPermission deniedBroken symbolic linkRelative path issues
”No git repos found”
This error means Dirty scanned the directory but didn’t find any.git folders:
Solutions
Solutions
Increase search depthThe default depth is 3. Your repositories might be nested deeper:Check if repositories existVerify directory structureDirty looks for Scan the correct directory
.git directories, not .git files (which are used by submodules and worktrees):”No matching repos found”
This error means Dirty found repositories, but none matched your filters:Understanding filters
Understanding filters
You used —dirty but all repos are cleanYou used —local but all repos have remotesCombined filters are too restrictiveThis is actually good newsIf
dirty --dirty ~/code returns “No matching repos found”, it means all your repositories are clean!Symbolic links
Dirty skips symbolic links to avoid infinite loops and duplicate scanning:Working with symbolic links
Working with symbolic links
Why symbolic links are skippedDetecting symlinked repositoriesIf you suspect Dirty is missing repositories due to symlinks:
- Prevents infinite loops: Circular symlinks would cause infinite recursion
- Avoids duplicates: Same repo could be found multiple times
- Performance: Symlink resolution adds overhead
Nested git repositories
Dirty stops at the first.git directory and doesn’t scan subdirectories within repositories:
Understanding nested repository behavior
Understanding nested repository behavior
Why Dirty stops at .git directoriesIntentionally nested repositoriesIf you have repositories nested inside other repositories (not as submodules), you’ll need to scan them separately:Finding all .git directories manuallyTo find all
- Performance: Avoids traversing large repository file trees
- Correctness: Nested
.gitfolders inside a repo are usually submodules or invalid - Predictability: One repository = one result
.git directories regardless of nesting:SIGPIPE handling
Dirty handles SIGPIPE signals to work correctly in Unix pipelines:What is SIGPIPE and why does it matter?
What is SIGPIPE and why does it matter?
The problemWhen piping output to commands like Default Rust behaviorBy default, Rust panics on SIGPIPE, which creates ugly error messages:When this happensSIGPIPE occurs in these scenarios:You don’t need to worry about thisThis is handled automatically by Dirty. It just works correctly in pipelines.
head, the receiving command might close the pipe before Dirty finishes writing:Frequently asked questions
Why is --include-unpushed so slow?
Why is --include-unpushed so slow?
The
--include-unpushed flag requires resolving the upstream tracking branch for each repository and computing graph distance, which involves:- Finding the current branch
- Resolving its upstream tracking branch
- Computing commits ahead/behind
- Handling cases like detached HEAD, no upstream, etc.
Can I exclude certain directories?
Can I exclude certain directories?
Dirty doesn’t have a built-in exclude mechanism, but you can use shell filtering:
How do I scan just one repository?
How do I scan just one repository?
Point Dirty directly at the repository:Dirty is designed for scanning multiple repositories. For single repositories, standard
git commands are more appropriate.Why are my git worktrees not detected?
Why are my git worktrees not detected?
Git worktrees use a Dirty only detects directories with a
.git file (not directory) that points to the actual git directory:.git/ folder. Worktrees and submodules (which use .git files) are not detected as separate repositories.To scan worktrees, scan the main repository instead:Does Dirty work with bare repositories?
Does Dirty work with bare repositories?
No. Dirty looks for If you need to check bare repositories, use git commands directly:
.git directories inside working trees. Bare repositories (which are the git directory itself) are not detected.Can I use Dirty in non-interactive scripts?
Can I use Dirty in non-interactive scripts?
Still having issues?
If you encounter a bug or unexpected behavior:-
Check your Dirty version: Ensure you have the latest version
-
Test with a simple case: Try scanning a directory you know has repositories
-
Report the issue: Open an issue on GitHub with:
- Dirty version
- Command you ran
- Expected vs actual behavior
- Directory structure (if relevant)
Dirty is open source! You can view the source code and report issues at github.com/iamkaf/dirty.