grep quux bazzy
'
-test_expect_success 'stash a change to turn a non-directory to a directory' '
- git reset --hard &&
- >testfile &&
- git add testfile &&
- git commit -m "add testfile as a regular file" &&
- rm testfile &&
- mkdir testfile &&
- >testfile/file &&
- test_must_fail git stash save "recover regular file" &&
- test -f testfile/file
-'
-
-test_expect_success 'stash a change to turn a non-directory to a directory (forced)' '
- git stash save --force "recover regular file (forced)" &&
- ! test -f testfile/file &&
- test -f testfile
+test_expect_success 'handle stash specification with spaces' '
+ git stash clear &&
+ echo pig >file &&
+ git stash &&
+ stamp=$(git log -g --format="%cd" -1 refs/stash) &&
+ test_tick &&
+ echo cow >file &&
+ git stash &&
+ git stash apply "stash@{$stamp}" &&
+ grep pig file
'
test_done