From: Matt Graham Date: Sat, 16 May 2009 03:10:19 GMT Subject: [PATCH] new test fails "add -p" for adds on the top line Message-ID: <1c5969370905152010m486a8b85s96334e99e6c54ad5@mail.gmail.com> add -p doesn't work for some diffs. diffs adding a new line at the top of the file with other adds later in the file are one way to trigger the problem. during add -p, split the diff and then answer y for all segments. the file won't have been added to the index. Signed-off-by: Matthew Graham --- t/t3701-add-interactive.sh | 32 ++++++++++++++++++++++++++++++++ 1 files changed, 32 insertions(+), 0 deletions(-) diff --git a/t/t3701-add-interactive.sh b/t/t3701-add-interactive.sh index dfc6560..45da6c8 100755 --- a/t/t3701-add-interactive.sh +++ b/t/t3701-add-interactive.sh @@ -163,6 +163,38 @@ test_expect_success FILEMODE 'stage mode but not hunk' ' git diff file | grep "+content" ' +# Write the patch file with a new line at the top and bottom +cat >patch <expected < diff && + test_cmp expected diff +' + # end of tests disabled when filemode is not usable test_done -- 1.6.3.9.g6345