sub-process: move sub-process functions into separate files
[gitweb.git] / t / t3904-stash-patch.sh
index 38e730090fe311ea82c737646aedba214d1143bb..83744f8c930637560d7d97123a2ffbd38030637e 100755 (executable)
@@ -77,6 +77,14 @@ test_expect_success 'git stash --no-keep-index -p' '
        verify_state dir/foo work index
 '
 
+test_expect_success 'stash -p --no-keep-index -- <pathspec> does not unstage other files' '
+       set_state HEAD HEADfile_work HEADfile_index &&
+       set_state dir/foo work index &&
+       echo y | git stash push -p --no-keep-index -- HEAD &&
+       verify_state HEAD committed committed &&
+       verify_state dir/foo work index
+'
+
 test_expect_success 'none of this moved HEAD' '
        verify_saved_head
 '