Skip to content

iamkaf/dirty

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dirty

A fast CLI that scans a directory for git repos and shows which ones have uncommitted changes and which are local-only (no remote).

$ dirty ~/code
 * apps/dashboard [main] [↑2]
   apps/storefront [main]
 * libs/ui-kit [local]
   libs/common [main]
 * services/auth [main]
   services/payments [main]
   tools/cli [local]
 * tools/scripts [local]

8 repos, 4 dirty, 3 local-only
  • * — repo has uncommitted changes (red)
  • [local] — repo has no remotes configured (yellow)
  • [branch] — current branch, shown with -b (cyan)
  • [↑N] — N commits ahead of upstream, shown with -u when N > 0 (blue)

Install

cargo install --git https://github.com/iamkaf/dirty

Usage

dirty <path>              # scan (default depth: 3)
dirty -L 1 <path>         # scan immediate subdirectories only
dirty -d <path>           # only dirty repos
dirty -l <path>           # only local-only repos
dirty -dlr <path>         # dirty + local, raw paths for piping
dirty -b <path>           # include current branch in the output
dirty -u <path>           # include unpushed commits info (ahead of upstream)
dirty -dub <path>         # dirty + unpushed (treated as pending), with branch info
dirty --branch <path>
dirty --include-unpushed <path>
Flag Short Default Description
--depth -L 3 Max directory depth to search for repos
--dirty -d off Only show repos with uncommitted changes (also unpushed commits when combined with -u)
--local -l off Only show repos with no remotes
--branch -b off Show the current branch
--include-unpushed -u off Include unpushed commit info (ahead of upstream)
--raw -r off One path per line, no decorations

How it works

  1. Walks directories up to the specified depth looking for .git folders
  2. Inspects each repo in parallel using libgit2 (via git2) and rayon
  3. Checks for uncommitted/untracked changes and whether any remotes exist

About

A fast CLI that scans a directory for git repos and shows which ones have uncommitted changes and which are local-only (no remote).

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Contributors

Languages