提交 7e9e0486 编写于 作者: M Matthieu Moy 提交者: Junio C Hamano

stash -p: demonstrate failure of split with mixed y/n

Signed-off-by: NMatthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: NJunio C Hamano <gitster@pobox.com>
上级 798a5b03
...@@ -81,4 +81,27 @@ test_expect_success 'none of this moved HEAD' ' ...@@ -81,4 +81,27 @@ test_expect_success 'none of this moved HEAD' '
verify_saved_head verify_saved_head
' '
test_expect_failure 'stash -p with split hunk' '
git reset --hard &&
cat >test <<-\EOF &&
aaa
bbb
ccc
EOF
git add test &&
git commit -m "initial" &&
cat >test <<-\EOF &&
aaa
added line 1
bbb
added line 2
ccc
EOF
printf "%s\n" s n y q |
test_might_fail git stash -p 2>error &&
! test_must_be_empty error &&
grep "added line 1" test &&
! grep "added line 2" test
'
test_done test_done
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册