summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2011-04-01 23:23:43 (GMT)
committerJunio C Hamano <gitster@pobox.com>2011-04-01 23:23:43 (GMT)
commit2aa5b6b6c0b2a2791dc9953371f2dca030b01a4d (patch)
tree7d4aaf0b0b04a5efd39b34206e0ac448c31095e1 /t
parentbcf3d1fd9ccc04350d793c077d3c112fb26f43f0 (diff)
parent6eaf92f3d08180da4a6bd40035919a7e07ffed5a (diff)
downloadgit-2aa5b6b6c0b2a2791dc9953371f2dca030b01a4d.zip
git-2aa5b6b6c0b2a2791dc9953371f2dca030b01a4d.tar.gz
git-2aa5b6b6c0b2a2791dc9953371f2dca030b01a4d.tar.bz2
Merge branch 'pk/stash-apply-status-relative' into maint
* 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-xt/t3903-stash.sh19
1 files changed, 19 insertions, 0 deletions
diff --git a/t/t3903-stash.sh b/t/t3903-stash.sh
index 6fd560c..f62aaf5 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