bug-patch
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [bug-patch] [PATCH] Add regression test for binary file deletion


From: Andreas Grünbacher
Subject: Re: [bug-patch] [PATCH] Add regression test for binary file deletion
Date: Mon, 24 Sep 2012 18:44:26 +0200

Hmm,

this is an interesting case; thanks for the report.

With a text file, the patch contains the contents of the file to
delete, and we can recreate it by reverse applying the patch.  With
this patch, we cannot.  Right now, patch fails and gives this error
message:

  patching file target
  File target is not empty after patch, as expected

All previous releases of patch didn't recognize this as a diff at all.
 If a binary diff is used instead, patch rejects it with:

  File target: git binary diffs are not supported.

Git deletes binary files when passed a binary diff (git diff
--binary), but it rejects this patch with:

  error: cannot apply binary patch to 'target' without full index line
  error: target: patch does not apply

This seems to confirm that patch's current behavior makes sense; the
error message could be better though.

What do you think?

Thanks,
Andreas



reply via email to

[Prev in Thread] Current Thread [Next in Thread]