stash: fix handling removed files with --keep-index
[gitweb.git] / t / t3903-stash.sh
index ea30d5f6a0f228971d29e257a89fca6ea594cecb..151cd497be88f2612d44614929841cc3bb3d1219 100755 (executable)
@@ -1216,4 +1216,11 @@ test_expect_success 'stash works when user.name and user.email are not set' '
        )
 '
 
+test_expect_success 'stash --keep-index with file deleted in index does not resurrect it on disk' '
+       test_commit to-remove to-remove &&
+       git rm to-remove &&
+       git stash --keep-index &&
+       test_path_is_missing to-remove
+'
+
 test_done