Skip to content

Commit

Permalink
git-apply -R: binary patches are irreversible for now.
Browse files Browse the repository at this point in the history
Signed-off-by: Junio C Hamano <junkio@cox.net>
  • Loading branch information
Junio C Hamano committed Jul 28, 2006
1 parent e5a9431 commit ab9f30f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions builtin-apply.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit ab9f30f

Please sign in to comment.