diff options
author | 2019-12-01 09:04:37 -0800 | |
---|---|---|
committer | 2019-12-01 09:04:37 -0800 | |
commit | 3c3e5d0ea2158bdc4f2244adff08504e50653d7c (patch) | |
tree | 287ce5f51018446e1a3669dd39b96fdbfdb157a5 /t | |
parent | Merge branch 'nn/doc-rebase-merges' (diff) | |
parent | stash: make sure we have a valid index before writing it (diff) | |
download | tgif-3c3e5d0ea2158bdc4f2244adff08504e50653d7c.tar.xz |
Merge branch 'tg/stash-refresh-index'
Recent update to "git stash pop" made the command empty the index
when run with the "--quiet" option, which has been corrected.
* tg/stash-refresh-index:
stash: make sure we have a valid index before writing it
Diffstat (limited to 't')
-rwxr-xr-x | t/t3903-stash.sh | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/t/t3903-stash.sh b/t/t3903-stash.sh index a4da72f0ab..ea56e85e70 100755 --- a/t/t3903-stash.sh +++ b/t/t3903-stash.sh @@ -244,8 +244,11 @@ test_expect_success 'save -q is quiet' ' test_must_be_empty output.out ' -test_expect_success 'pop -q is quiet' ' +test_expect_success 'pop -q works and is quiet' ' git stash pop -q >output.out 2>&1 && + echo bar >expect && + git show :file >actual && + test_cmp expect actual && test_must_be_empty output.out ' @@ -254,6 +257,8 @@ test_expect_success 'pop -q --index works and is quiet' ' git add file && git stash save --quiet && git stash pop -q --index >output.out 2>&1 && + git diff-files file2 >file2.diff && + test_must_be_empty file2.diff && test foo = "$(git show :file)" && test_must_be_empty output.out ' |