Skip to content

Commit

Permalink
Updated check-all-commited at bin/release
Browse files Browse the repository at this point in the history
  • Loading branch information
MOZGIII committed Mar 19, 2016
1 parent 281388a commit c9f1118
Showing 1 changed file with 4 additions and 20 deletions.
24 changes: 4 additions & 20 deletions bin/release
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit c9f1118

Please sign in to comment.