hooks: do not render git stash output

The `-q` options hides most of the output, but not everything.
This commit is contained in:
Ana María Martínez Gómez
2020-07-29 09:44:06 +02:00
parent 70dda980e8
commit 22fd52ccb9
2 changed files with 4 additions and 4 deletions

View File

@@ -13,7 +13,7 @@
# Stash uncommited changes # Stash uncommited changes
MSG="post-commit-$(date +%s)"; MSG="post-commit-$(date +%s)";
git stash push -kqum "$MSG"; git stash push -kum "$MSG" &>/dev/null ;
STASH_LIST=$(git stash list); STASH_LIST=$(git stash list);
if [[ "$STASH_LIST" == *"$MSG"* ]]; then if [[ "$STASH_LIST" == *"$MSG"* ]]; then
echo "Uncommited changes stashed with message '$MSG', if you abort before they are restored run \`git stash pop\`"; 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 # Restore stashed changes
if [[ "$STASH_LIST" == *"$MSG"* ]]; then if [[ "$STASH_LIST" == *"$MSG"* ]]; then
git stash pop -q --index; git stash pop --index &>/dev/null ;
echo "Stashed changes '$MSG' restored"; echo "Stashed changes '$MSG' restored";
fi fi

View File

@@ -13,7 +13,7 @@
# Stash uncommited changes # Stash uncommited changes
MSG="pre-push-$(date +%s)"; MSG="pre-push-$(date +%s)";
git stash push -kqum "$MSG"; git stash push -kum "$MSG" &>/dev/null ;
STASH_LIST=$(git stash list); STASH_LIST=$(git stash list);
if [[ "$STASH_LIST" == *"$MSG"* ]]; then if [[ "$STASH_LIST" == *"$MSG"* ]]; then
echo "Uncommited changes stashed with message '$MSG', if you abort before they are restored run \`git stash pop\`"; 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() { restore_stashed() {
if [[ "$STASH_LIST" == *"$MSG"* ]]; then if [[ "$STASH_LIST" == *"$MSG"* ]]; then
git stash pop -q --index; git stash pop --index &>/dev/null ;
echo "Stashed changes '$MSG' restored"; echo "Stashed changes '$MSG' restored";
fi fi
} }