summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoel Teichroeb <joel@teichroeb.net>2017-08-19 13:13:24 -0700
committerJunio C Hamano <gitster@pobox.com>2017-08-19 14:03:53 -0700
commitc95bc226d4ccc313303f700f11815c03fbec4efc (patch)
tree3cc93f8d791cb5dfcbc74e787ff9d1831c9d424d
parentb3622a4ee94e4916cd05e6d96e41eeb36b941182 (diff)
downloadgit-c95bc226d4ccc313303f700f11815c03fbec4efc.tar.gz
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>
-rwxr-xr-xt/t3903-stash.sh8
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" &&