Skip to content

Commit c95bc22

Browse files
klusarkgitster
authored andcommitted
stash: add a test for stash create with no files
Ensure the command suceeds and outputs nothing Signed-off-by: Joel Teichroeb <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent b3622a4 commit c95bc22

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

t/t3903-stash.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -444,6 +444,14 @@ test_expect_failure 'stash file to directory' '
444444
test foo = "$(cat file/file)"
445445
'
446446

447+
test_expect_success 'stash create - no changes' '
448+
git stash clear &&
449+
test_when_finished "git reset --hard HEAD" &&
450+
git reset --hard &&
451+
git stash create >actual &&
452+
test_must_be_empty actual
453+
'
454+
447455
test_expect_success 'stash branch - no stashes on stack, stash-like argument' '
448456
git stash clear &&
449457
test_when_finished "git reset --hard HEAD" &&

0 commit comments

Comments
 (0)