summaryrefslogtreecommitdiff
path: root/t/t3903-stash.sh
diff options
context:
space:
mode:
Diffstat (limited to 't/t3903-stash.sh')
-rwxr-xr-xt/t3903-stash.sh18
1 files changed, 17 insertions, 1 deletions
diff --git a/t/t3903-stash.sh b/t/t3903-stash.sh
index 580bfbd..ea56e85 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
'
@@ -1269,4 +1274,15 @@ test_expect_success 'stash apply should succeed with unmodified file' '
git stash apply
'
+test_expect_success 'stash handles skip-worktree entries nicely' '
+ test_commit A &&
+ echo changed >A.t &&
+ git add A.t &&
+ git update-index --skip-worktree A.t &&
+ rm A.t &&
+ git stash &&
+
+ git rev-parse --verify refs/stash:A.t
+'
+
test_done