diff options
Diffstat (limited to 'add')
-rwxr-xr-x | add | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -38,6 +38,10 @@ modified="$(git status --porcelain | sed -n -e 's/^ M \(.*\)/\1/p')" uc="$(echo "$untracked" | wc -w)" mc="$(echo "$modified" | wc -w)" +if [ "$uc" -eq 0 -a "$mc" -eq 0 ]; then + error "error: nothing untracked/modified" +fi + if [ "$uc" -gt 0 -a "$mc" -gt 0 ]; then error "error: multiple untracked/modified files" fi |