diff options
author | Junio C Hamano <gitster@pobox.com> | 2017-06-22 23:15:24 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-06-22 23:15:25 +0200 |
commit | 49a8bf2edaa7c5922677e1ae04cf44df0c0c8abf (patch) | |
tree | 775364213b59807747ee3998634c97d735efe70d /t/t3903-stash.sh | |
parent | Merge branch 'ls/github' (diff) | |
parent | git-stash: fix pushing stash with pathspec from subdir (diff) | |
download | git-49a8bf2edaa7c5922677e1ae04cf44df0c0c8abf.tar.xz git-49a8bf2edaa7c5922677e1ae04cf44df0c0c8abf.zip |
Merge branch 'ps/stash-push-pathspec-fix'
"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/t3903-stash.sh')
-rwxr-xr-x | t/t3903-stash.sh | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/t/t3903-stash.sh b/t/t3903-stash.sh index 3b4bed5c9a..4046817d70 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 && |