| # Copyright (c) 2006 Junio C Hamano |
| test_description='git apply with new style GNU diff with empty context |
| test_expect_success setup ' |
| sed -e "/^B/d" <file1.orig >file1 && |
| sed -e "/^[BQ]/d" <file2.orig >file2 && |
| echo Q | tr -d "\\012" >>file2 && |
| sed -e "s/^ \$//" >diff.output |
| test_expect_success 'apply --numstat' ' |
| git apply --numstat diff.output >actual && |
| test_expect_success 'apply --apply' ' |
| git update-index file1 file2 && |
| git apply --index diff.output && |
| git diff file1.mods file1 && |
| git diff file2.mods file2 |