stash: teach quiet option

Teach stash pop, apply, save, and drop to be quiet when told. By using
the quiet option (-q), these actions will be silent unless errors are
encountered.

Signed-off-by: Stephen Boyd <bebarino@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Stephen Boyd
2009-06-17 18:07:37 -07:00
committed by Junio C Hamano
parent 0e987a12fc
commit fcdd0e92d9
3 changed files with 92 additions and 24 deletions

View File

@ -177,4 +177,27 @@ test_expect_success 'stash branch' '
test 0 = $(git stash list | wc -l)
'
test_expect_success 'apply -q is quiet' '
echo foo > file &&
git stash &&
git stash apply -q > output.out 2>&1 &&
test ! -s output.out
'
test_expect_success 'save -q is quiet' '
git stash save --quiet > output.out 2>&1 &&
test ! -s output.out
'
test_expect_success 'pop -q is quiet' '
git stash pop -q > output.out 2>&1 &&
test ! -s output.out
'
test_expect_success 'drop -q is quiet' '
git stash &&
git stash drop -q > output.out 2>&1 &&
test ! -s output.out
'
test_done