From 22fd52ccb9e82131cb4e95481367b548d1ec6e5d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ana=20Mar=C3=ADa=20Mart=C3=ADnez=20G=C3=B3mez?= Date: Wed, 29 Jul 2020 09:44:06 +0200 Subject: [PATCH] hooks: do not render git stash output The `-q` options hides most of the output, but not everything. --- scripts/hooks/post-commit | 4 ++-- scripts/hooks/pre-push | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/hooks/post-commit b/scripts/hooks/post-commit index 9062aae4..c411d8ad 100755 --- a/scripts/hooks/post-commit +++ b/scripts/hooks/post-commit @@ -13,7 +13,7 @@ # Stash uncommited changes MSG="post-commit-$(date +%s)"; -git stash push -kqum "$MSG"; +git stash push -kum "$MSG" &>/dev/null ; STASH_LIST=$(git stash list); if [[ "$STASH_LIST" == *"$MSG"* ]]; then echo "Uncommited changes stashed with message '$MSG', if you abort before they are restored run \`git stash pop\`"; @@ -57,6 +57,6 @@ fi # Restore stashed changes if [[ "$STASH_LIST" == *"$MSG"* ]]; then - git stash pop -q --index; + git stash pop --index &>/dev/null ; echo "Stashed changes '$MSG' restored"; fi diff --git a/scripts/hooks/pre-push b/scripts/hooks/pre-push index e827f8af..f25aca57 100755 --- a/scripts/hooks/pre-push +++ b/scripts/hooks/pre-push @@ -13,7 +13,7 @@ # Stash uncommited changes MSG="pre-push-$(date +%s)"; -git stash push -kqum "$MSG"; +git stash push -kum "$MSG" &>/dev/null ; STASH_LIST=$(git stash list); if [[ "$STASH_LIST" == *"$MSG"* ]]; then echo "Uncommited changes stashed with message '$MSG', if you abort before they are restored run \`git stash pop\`"; @@ -21,7 +21,7 @@ fi restore_stashed() { if [[ "$STASH_LIST" == *"$MSG"* ]]; then - git stash pop -q --index; + git stash pop --index &>/dev/null ; echo "Stashed changes '$MSG' restored"; fi }