On Wed, Oct 12, 2011 at 10:18:01AM +0200, Jim Meyering wrote: > I noticed this when "git am CORRUPTED" unexpectedly failed with an > odd diagnostic, and even removed one of the files it was supposed > to have patched. > > Reproduce with any valid old/new patch from which you have removed > the "+++ b/FILE" line. You'll see a diagnostic like this > > fatal: unable to write file '(null)' mode 100644: Bad address > > and you'll find that FILE has been removed. Yikes. Your fix looks right to me. > builtin/apply.c | 3 +++ > t/t4254-am-corrupt.sh | 43 +++++++++++++++++++++++++++++++++++++++++++ > 2 files changed, 46 insertions(+), 0 deletions(-) > create mode 100644 t/t4254-am-corrupt.sh Missing executable bit on the new test. -Peff -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html