diff options
Diffstat (limited to 't/t3903-stash.sh')
-rwxr-xr-x | t/t3903-stash.sh | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/t/t3903-stash.sh b/t/t3903-stash.sh index 89877e4b52..b71d1e659e 100755 --- a/t/t3903-stash.sh +++ b/t/t3903-stash.sh @@ -663,7 +663,7 @@ test_expect_success 'stash apply shows status same as git status (relative to cu sane_unset GIT_MERGE_VERBOSITY && git stash apply ) | - sed -e 1,2d >actual && # drop "Saved..." and "HEAD is now..." + sed -e 1d >actual && # drop "Saved..." test_i18ncmp expect actual ' @@ -907,4 +907,18 @@ test_expect_success 'stash without verb with pathspec' ' test_path_is_file bar ' +test_expect_success 'stash -k -- <pathspec> leaves unstaged files intact' ' + git reset && + >foo && + >bar && + git add foo bar && + git commit -m "test" && + echo "foo" >foo && + echo "bar" >bar && + git stash -k -- foo && + test "",bar = $(cat foo),$(cat bar) && + git stash pop && + test foo,bar = $(cat foo),$(cat bar) +' + test_done |