Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorPiotr Krukowiecki <piotr.krukowiecki@gmail.com>2011-03-14 22:19:36 +0300
committerJunio C Hamano <gitster@pobox.com>2011-03-21 07:45:11 +0300
commit6eaf92f3d08180da4a6bd40035919a7e07ffed5a (patch)
tree288e6291a65575f6aad4f81d9552812ab39f0ab4 /t
parent26b59b4812c81de09aa450ebbdf2bb0ea71c0dfd (diff)
Add test: git stash shows status relative to current dir
[jc: moved "cd subdir" inside subshell and fixed comparison with expected] Signed-off-by: Piotr Krukowiecki <piotr.krukowiecki@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
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 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