diff --git a/scripts/pre-commit b/scripts/pre-commit index 2f1059290c..2d92db6d20 100755 --- a/scripts/pre-commit +++ b/scripts/pre-commit @@ -63,15 +63,6 @@ fi # Redirect output to stderr. exec 1>&2 -diff_size=$(git diff | wc -l) - -pre_stash_size=$(git stash list | wc -l) -git stash push --quiet --keep-index --include-untracked --message "pre-commit-stash" -post_stash_size=$(git stash list | wc -l) -increased_stash_size=$((post_stash_size - pre_stash_size)) - -# If the stash size has increased, it means a new stash entry was created. - nocontinue=0 for file in `git diff --cached --name-only` @@ -123,12 +114,7 @@ do fi done -if [ $increased_stash_size -gt 0 ]; then - git stash pop --quiet --index -fi - if [ $nocontinue -ne 0 ]; then - printf '\033[38;5;208m%s\033[0m\n' "Pre-commit found errors. Did you add the latest changes?" echo "Note: To correct typos and fix indentation, run ./scripts/spell_check_and_indent.sh" fi