summaryrefslogtreecommitdiff
path: root/t/t3903-stash.sh
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2022-01-10 19:52:57 (GMT)
committerJunio C Hamano <gitster@pobox.com>2022-01-10 19:52:57 (GMT)
commit6e223455917954f414cea98b00b67aac91e2b619 (patch)
tree11660c11d32fa367ecb6e666830a192a84c366f2 /t/t3903-stash.sh
parent27a70fa0446a7ddfb2c0582a9c191bf00040fcef (diff)
parent71cade5a0b172ece7edf0ccb4420dd5b9a07e71a (diff)
downloadgit-6e223455917954f414cea98b00b67aac91e2b619.zip
git-6e223455917954f414cea98b00b67aac91e2b619.tar.gz
git-6e223455917954f414cea98b00b67aac91e2b619.tar.bz2
Merge branch 'en/stash-df-fix'
"git stash apply" forgot to attempt restoring untracked files when it failed to restore changes to tracked ones. * en/stash-df-fix: stash: do not return before restoring untracked files
Diffstat (limited to 't/t3903-stash.sh')
-rwxr-xr-xt/t3903-stash.sh24
1 files changed, 24 insertions, 0 deletions
diff --git a/t/t3903-stash.sh b/t/t3903-stash.sh
index b17c52d..686747e 100755
--- a/t/t3903-stash.sh
+++ b/t/t3903-stash.sh
@@ -1395,4 +1395,28 @@ test_expect_success 'git stash can pop directory -> file saved changes' '
)
'
+test_expect_success 'restore untracked files even when we hit conflicts' '
+ git init restore_untracked_after_conflict &&
+ (
+ cd restore_untracked_after_conflict &&
+
+ echo hi >a &&
+ echo there >b &&
+ git add . &&
+ git commit -m first &&
+ echo hello >a &&
+ echo something >c &&
+
+ git stash push --include-untracked &&
+
+ echo conflict >a &&
+ git add a &&
+ git commit -m second &&
+
+ test_must_fail git stash pop &&
+
+ test_path_is_file c
+ )
+'
+
test_done