diff: respect MIN_BLOCK_LENGTH for last block
[gitweb.git] / t / t3903-stash.sh
index 3b4bed5c9ace3b9122380287c55b4130135018c7..4046817d70a0ac1dd5b11a49c500896688a4f0b1 100755 (executable)
@@ -812,6 +812,22 @@ test_expect_success 'stash -- <pathspec> stashes and restores the file' '
        test_path_is_file bar
 '
 
+test_expect_success 'stash -- <pathspec> stashes in subdirectory' '
+       mkdir sub &&
+       >foo &&
+       >bar &&
+       git add foo bar &&
+       (
+               cd sub &&
+               git stash push -- ../foo
+       ) &&
+       test_path_is_file bar &&
+       test_path_is_missing foo &&
+       git stash pop &&
+       test_path_is_file foo &&
+       test_path_is_file bar
+'
+
 test_expect_success 'stash with multiple pathspec arguments' '
        >foo &&
        >bar &&