summaryrefslogtreecommitdiff
path: root/t/t3903-stash.sh
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2019-10-07 02:32:53 (GMT)
committerJunio C Hamano <gitster@pobox.com>2019-10-07 02:32:53 (GMT)
commitba2d45112224a0bd5ba0f10ba180c88d148cec36 (patch)
treec4824e0fa57f40c49904807f9913aa4c2160b6bb /t/t3903-stash.sh
parentc90b652afd68364640009a52fa6bf6f5fd245186 (diff)
parent34933d0eff5d4c91fae6ad6f71a6e6a69a496ced (diff)
downloadgit-ba2d45112224a0bd5ba0f10ba180c88d148cec36.zip
git-ba2d45112224a0bd5ba0f10ba180c88d148cec36.tar.gz
git-ba2d45112224a0bd5ba0f10ba180c88d148cec36.tar.bz2
Merge branch 'tg/stash-refresh-index'
"git stash" learned to write refreshed index back to disk. * tg/stash-refresh-index: stash: make sure to write refreshed cache merge: use refresh_and_write_cache factor out refresh_and_write_cache function
Diffstat (limited to 't/t3903-stash.sh')
-rwxr-xr-xt/t3903-stash.sh16
1 files changed, 16 insertions, 0 deletions
diff --git a/t/t3903-stash.sh b/t/t3903-stash.sh
index 820b350..580bfbd 100755
--- a/t/t3903-stash.sh
+++ b/t/t3903-stash.sh
@@ -1253,4 +1253,20 @@ test_expect_success 'stash --keep-index with file deleted in index does not resu
test_path_is_missing to-remove
'
+test_expect_success 'stash apply should succeed with unmodified file' '
+ echo base >file &&
+ git add file &&
+ git commit -m base &&
+
+ # now stash a modification
+ echo modified >file &&
+ git stash &&
+
+ # make the file stat dirty
+ cp file other &&
+ mv other file &&
+
+ git stash apply
+'
+
test_done