diff options
author | Junio C Hamano <gitster@pobox.com> | 2013-06-27 14:29:41 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2013-06-27 14:29:41 -0700 |
commit | fa4bf9edb9300da2688da8a920c506376a14de0a (patch) | |
tree | 0a2aca289c7dcc2d1f12c57fb1a925c12db46506 /t/t3903-stash.sh | |
parent | 85318f521f6c0b9843d6da12abf67f2de7608431 (diff) | |
parent | 20351bb06bf4d32ef3d1a6849d01636f6593339f (diff) | |
download | git-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-x | t/t3903-stash.sh | 19 |
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 |