From c9f11181aa7c45c11a3728a5bd3018a7bf722794 Mon Sep 17 00:00:00 2001 From: MOZGIII Date: Sun, 20 Mar 2016 00:51:25 +0300 Subject: [PATCH] Updated check-all-commited at bin/release --- bin/release | 24 ++++-------------------- 1 file changed, 4 insertions(+), 20 deletions(-) diff --git a/bin/release b/bin/release index ba8af41..9d34196 100755 --- a/bin/release +++ b/bin/release @@ -116,27 +116,11 @@ check-all-pushed() { check-all-commited() { echo "==> Ensuring everything is commited" - # Update the index - git update-index -q --ignore-submodules --refresh - ERR=0 - - # Disallow unstaged changes in the working tree - if ! git diff-files --quiet --ignore-submodules --; then - error "Error: you have unstaged changes" - git diff-files --name-status -r --ignore-submodules -- >&2 - ERR=1 - fi - - # Disallow uncommitted changes in the index - if ! git diff-index --cached --quiet HEAD --ignore-submodules --; then - error "Error: your index contains uncommitted changes" - git diff-index --cached --name-status -r --ignore-submodules HEAD -- >&2 - ERR=1 - fi + STATUS="$(git status --porcelain)" - # Crash on error - if [ "$ERR" == "1" ]; then - error "Please commit or stash them" + if [[ -n "$STATUS" ]]; then + error "Error: you have uncommited files, commit or stash them" + error "$STATUS" exit 1 fi }