summaryrefslogtreecommitdiffstats
path: root/t/t3903-stash.sh
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2019-11-10 10:02:16 +0100
committerJunio C Hamano <gitster@pobox.com>2019-11-10 10:02:16 +0100
commit57b530125e022de79f5f0b208bc0a5ee67c18b77 (patch)
treeb6eaafd7b203b0886aa44d3a299823cbd2eeb933 /t/t3903-stash.sh
parentMerge branch 'pb/pretty-email-without-domain-part' (diff)
parentstash: handle staged changes in skip-worktree files correctly (diff)
downloadgit-57b530125e022de79f5f0b208bc0a5ee67c18b77.tar.xz
git-57b530125e022de79f5f0b208bc0a5ee67c18b77.zip
Merge branch 'js/update-index-ignore-removal-for-skip-worktree'
"git stash save" in a working tree that is sparsely checked out mistakenly removed paths that are outside the area of interest. * js/update-index-ignore-removal-for-skip-worktree: stash: handle staged changes in skip-worktree files correctly update-index: optionally leave skip-worktree entries alone
Diffstat (limited to 't/t3903-stash.sh')
-rwxr-xr-xt/t3903-stash.sh11
1 files changed, 11 insertions, 0 deletions
diff --git a/t/t3903-stash.sh b/t/t3903-stash.sh
index 580bfbdc23..a4da72f0ab 100755
--- a/t/t3903-stash.sh
+++ b/t/t3903-stash.sh
@@ -1269,4 +1269,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