aboutsummaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2017-06-24 15:29:30 -0700
committerJunio C Hamano <gitster@pobox.com>2017-06-24 15:29:30 -0700
commitc4db75f275327a9e0fe0b62096a6a7e5220bb041 (patch)
treef9d74474e2ce60ba05d32562bbbf87fdd81ecfc6 /t
parent0378c85644539a5a2e766a1230e844e6e70b8e16 (diff)
parent22fc703ec949602e9fd4e2ab0bb63dd47c2945b5 (diff)
downloadgit-c4db75f275327a9e0fe0b62096a6a7e5220bb041.tar.gz
git-c4db75f275327a9e0fe0b62096a6a7e5220bb041.tar.xz
Merge branch 'ps/stash-push-pathspec-fix' into maint
"git stash push <pathspec>" did not work from a subdirectory at all. Bugfix for a topic in v2.13 * ps/stash-push-pathspec-fix: git-stash: fix pushing stash with pathspec from subdir
Diffstat (limited to 't')
-rwxr-xr-xt/t3903-stash.sh16
1 files changed, 16 insertions, 0 deletions
diff --git a/t/t3903-stash.sh b/t/t3903-stash.sh
index 3b4bed5c9..4046817d7 100755
--- a/t/t3903-stash.sh
+++ b/t/t3903-stash.sh
@@ -812,6 +812,22 @@ test_expect_success 'stash -- <pathspec> stashes and restores the file' '
test_path_is_file bar
'
+test_expect_success 'stash -- <pathspec> stashes in subdirectory' '
+ mkdir sub &&
+ >foo &&
+ >bar &&
+ git add foo bar &&
+ (
+ cd sub &&
+ git stash push -- ../foo
+ ) &&
+ test_path_is_file bar &&
+ test_path_is_missing foo &&
+ git stash pop &&
+ test_path_is_file foo &&
+ test_path_is_file bar
+'
+
test_expect_success 'stash with multiple pathspec arguments' '
>foo &&
>bar &&