From: Junio C Hamano Date: Fri, 28 Jul 2006 19:21:17 +0000 (-0700) Subject: git-apply -R: binary patches are irreversible for now. X-Git-Tag: v1.4.2-rc3~45 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=ab9f30fd7538ec5385bf5a3d11117f23f4f320ee;p=git.git git-apply -R: binary patches are irreversible for now. Signed-off-by: Junio C Hamano --- diff --git a/builtin-apply.c b/builtin-apply.c index 6b38a8ad0..d4381d9a8 100644 --- a/builtin-apply.c +++ b/builtin-apply.c @@ -1535,6 +1535,12 @@ static int apply_binary_fragment(struct buffer_desc *desc, struct patch *patch) void *data; void *result; + /* Binary patch is irreversible */ + if (patch->is_reverse) + return error("cannot reverse-apply a binary patch to '%s'", + patch->new_name + ? patch->new_name : patch->old_name); + data = inflate_it(fragment->patch, fragment->size, patch->deflate_origlen); if (!data)