Skip to content

Instantly share code, notes, and snippets.

@m4tthumphrey
Created August 14, 2015 13:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save m4tthumphrey/679d189c241dcb27d267 to your computer and use it in GitHub Desktop.
Save m4tthumphrey/679d189c241dcb27d267 to your computer and use it in GitHub Desktop.
Quick command for checking for dirty git repositories inside of a composer vendor directory. Move file somewhere in your path and run `cstatus <vendor name>` to get a list of any dirty repositories.
curdir=$(pwd)
vendor=$1
for f in $curdir/vendor/$vendor/*; do
[ -d $f ] && cd "$f" && output=$(git status --porcelain) && [ "$output" != "" ] && echo "$f" && echo "$output"
done;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment