reflog_expire: convert to struct object_id
[gitweb.git] / t / t3903-stash.sh
index 89877e4b52a4aa09b1e1925005a1a09826e2c7a0..b71d1e659e97c0f34bc5bcfeda65b854c2d714e9 100755 (executable)
@@ -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