From f67182bf65b01290a9544e9599ea8255e657e567 Mon Sep 17 00:00:00 2001 From: Matt Graham Date: Fri, 15 May 2009 23:10:19 -0400 Subject: [PATCH] Splitting a hunk that adds a line at the top fails in "add -p" Splitting a hunk into two in add -p doesn't work for a diff that adds a new line at the top of the file with other add in the same hunk. Signed-off-by: Matthew Graham Signed-off-by: Junio C Hamano --- t/t3701-add-interactive.sh | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/t/t3701-add-interactive.sh b/t/t3701-add-interactive.sh index dfc65601a..9999fcd4b 100755 --- a/t/t3701-add-interactive.sh +++ b/t/t3701-add-interactive.sh @@ -165,4 +165,36 @@ test_expect_success FILEMODE 'stage mode but not hunk' ' # end of tests disabled when filemode is not usable +# Write the patch file with a new line at the top and bottom +cat >patch <expected < diff && + test_cmp expected diff +' + test_done -- 2.26.2