diff options
author | Junio C Hamano <gitster@pobox.com> | 2011-03-23 14:55:37 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2011-03-23 14:55:37 -0700 |
commit | 6fe519a91cc7131931ca50fedcdeb8e41453c892 (patch) | |
tree | 42cc1a15b0bdb535713a2296192b9f9eaf0b4d63 /t | |
parent | Merge branch 'jc/maint-diff-q-filter' (diff) | |
parent | Add test: git stash shows status relative to current dir (diff) | |
download | tgif-6fe519a91cc7131931ca50fedcdeb8e41453c892.tar.xz |
Merge branch 'pk/stash-apply-status-relative'
* pk/stash-apply-status-relative:
Add test: git stash shows status relative to current dir
git stash: show status relative to current directory
Diffstat (limited to 't')
-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 6fd560ccf1..f62aaf5816 100755 --- a/t/t3903-stash.sh +++ b/t/t3903-stash.sh @@ -556,4 +556,23 @@ test_expect_success 'stash branch should not drop the stash if the branch exists git rev-parse stash@{0} -- ' +test_expect_success 'stash apply shows status same as git status (relative to current directory)' ' + git stash clear && + echo 1 >subdir/subfile1 && + echo 2 >subdir/subfile2 && + git add subdir/subfile1 && + git commit -m subdir && + ( + cd subdir && + echo x >subfile1 && + echo x >../file && + git status >../expect && + git stash && + sane_unset GIT_MERGE_VERBOSITY && + git stash apply + ) | + sed -e 1,2d >actual && # drop "Saved..." and "HEAD is now..." + test_cmp expect actual +' + test_done |