summaryrefslogtreecommitdiff
path: root/t/t3903-stash.sh
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2013-06-27 14:29:41 -0700
committerJunio C Hamano <gitster@pobox.com>2013-06-27 14:29:41 -0700
commitfa4bf9edb9300da2688da8a920c506376a14de0a (patch)
tree0a2aca289c7dcc2d1f12c57fb1a925c12db46506 /t/t3903-stash.sh
parent85318f521f6c0b9843d6da12abf67f2de7608431 (diff)
parent20351bb06bf4d32ef3d1a6849d01636f6593339f (diff)
downloadgit-fa4bf9edb9300da2688da8a920c506376a14de0a.tar.gz
Merge branch 'rr/rebase-stash-store'
Finishing touches for the "git rebase --autostash" feature introduced earlier. * rr/rebase-stash-store: rebase: use 'git stash store' to simplify logic stash: introduce 'git stash store' stash: simplify option parser for create stash doc: document short form -p in synopsis stash doc: add a warning about using create
Diffstat (limited to 't/t3903-stash.sh')
-rwxr-xr-xt/t3903-stash.sh19
1 files changed, 19 insertions, 0 deletions
diff --git a/t/t3903-stash.sh b/t/t3903-stash.sh
index 634b2b74f4..debda7a678 100755
--- a/t/t3903-stash.sh
+++ b/t/t3903-stash.sh
@@ -654,4 +654,23 @@ test_expect_success 'stash where working directory contains "HEAD" file' '
test_cmp output expect
'
+test_expect_success 'store called with invalid commit' '
+ test_must_fail git stash store foo
+'
+
+test_expect_success 'store updates stash ref and reflog' '
+ git stash clear &&
+ git reset --hard &&
+ echo quux >bazzy &&
+ git add bazzy &&
+ STASH_ID=$(git stash create) &&
+ git reset --hard &&
+ ! grep quux bazzy &&
+ git stash store -m quuxery $STASH_ID &&
+ test $(cat .git/refs/stash) = $STASH_ID &&
+ grep $STASH_ID .git/logs/refs/stash &&
+ git stash pop &&
+ grep quux bazzy
+'
+
test_done