diff options
author | Joel Teichroeb <joel@teichroeb.net> | 2017-08-19 23:13:24 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-08-20 00:03:53 +0300 |
commit | c95bc226d4ccc313303f700f11815c03fbec4efc (patch) | |
tree | 3cc93f8d791cb5dfcbc74e787ff9d1831c9d424d /t/t3903-stash.sh | |
parent | b3622a4ee94e4916cd05e6d96e41eeb36b941182 (diff) |
stash: add a test for stash create with no files
Ensure the command suceeds and outputs nothing
Signed-off-by: Joel Teichroeb <joel@teichroeb.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t3903-stash.sh')
-rwxr-xr-x | t/t3903-stash.sh | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/t/t3903-stash.sh b/t/t3903-stash.sh index 4046817d70..f0708ced27 100755 --- a/t/t3903-stash.sh +++ b/t/t3903-stash.sh @@ -444,6 +444,14 @@ test_expect_failure 'stash file to directory' ' test foo = "$(cat file/file)" ' +test_expect_success 'stash create - no changes' ' + git stash clear && + test_when_finished "git reset --hard HEAD" && + git reset --hard && + git stash create >actual && + test_must_be_empty actual +' + test_expect_success 'stash branch - no stashes on stack, stash-like argument' ' git stash clear && test_when_finished "git reset --hard HEAD" && |