summaryrefslogtreecommitdiff
path: root/builtin-apply.c
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2006-07-28 19:21:17 (GMT)
committerJunio C Hamano <junkio@cox.net>2006-07-28 19:21:17 (GMT)
commitab9f30fd7538ec5385bf5a3d11117f23f4f320ee (patch)
tree9aadfdafdf71a8e95d79da702e0841790719161f /builtin-apply.c
parente5a94313c06b83e034179ca6092ea23343e48dec (diff)
downloadgit-ab9f30fd7538ec5385bf5a3d11117f23f4f320ee.zip
git-ab9f30fd7538ec5385bf5a3d11117f23f4f320ee.tar.gz
git-ab9f30fd7538ec5385bf5a3d11117f23f4f320ee.tar.bz2
git-apply -R: binary patches are irreversible for now.
Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'builtin-apply.c')
-rw-r--r--builtin-apply.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/builtin-apply.c b/builtin-apply.c
index 6b38a8a..d4381d9 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)