#!/bin/sh # find dirty working directories/staging areas/stashes # This is to find stuff that needs to be checked in, not stuff that # needs to be pushed (`mr status` does a good job of the latter by # also calling `git --no-pager log --branches --not --remotes # --simplify-by-decoration --decorate --oneline`) set -e status="$(git status --porcelain -- "$@")" stashes="$(git stash list)" if ! [ -z "$status" -a -z "$stashes" ]; then printf "%s\n%s\n" "$status" "$stashes" exit 1 fi