diff options
author | Junio C Hamano <gitster@pobox.com> | 2021-11-29 15:41:46 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2021-11-29 15:41:47 -0800 |
commit | 44ac8fd1b4ce7598e2e5f4045dfbb6593a3f5b84 (patch) | |
tree | 89853567118c4f53b5259a8faef735226dbb9d17 /t/t3903-stash.sh | |
parent | Merge branch 'jc/tutorial-format-patch-base' (diff) | |
parent | stash: get rid of unused argument in stash_staged() (diff) | |
download | tgif-44ac8fd1b4ce7598e2e5f4045dfbb6593a3f5b84.tar.xz |
Merge branch 'so/stash-staged'
"git stash" learned the "--staged" option to stash away what has
been added to the index (and nothing else).
* so/stash-staged:
stash: get rid of unused argument in stash_staged()
stash: implement '--staged' option for 'push' and 'save'
Diffstat (limited to 't/t3903-stash.sh')
-rwxr-xr-x | t/t3903-stash.sh | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/t/t3903-stash.sh b/t/t3903-stash.sh index f0a82be9de..2c66cfbc3b 100755 --- a/t/t3903-stash.sh +++ b/t/t3903-stash.sh @@ -288,6 +288,17 @@ test_expect_success 'stash --no-keep-index' ' test bar,bar2 = $(cat file),$(cat file2) ' +test_expect_success 'stash --staged' ' + echo bar3 >file && + echo bar4 >file2 && + git add file2 && + git stash --staged && + test bar3,bar2 = $(cat file),$(cat file2) && + git reset --hard && + git stash pop && + test bar,bar4 = $(cat file),$(cat file2) +' + test_expect_success 'dont assume push with non-option args' ' test_must_fail git stash -q drop 2>err && test_i18ngrep -e "subcommand wasn'\''t specified; '\''push'\'' can'\''t be assumed due to unexpected token '\''drop'\''" err |