diff options
author | Junio C Hamano <junkio@cox.net> | 2006-08-15 13:23:06 +0400 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2006-08-15 14:11:52 +0400 |
commit | 3cd4f5e8eb04ae01298ceaf46bb41a4277031916 (patch) | |
tree | ea9ea5824ce4073efe097dd35ae094ba761ccc57 /sha1_name.c | |
parent | d1b9944db8f66131b259be407472e53db33718ea (diff) |
git-apply --binary: clean up and prepare for --reverse
This cleans up the implementation of "git-apply --binary", and
implements reverse application of binary patches (when git-diff
is converted to emit reversible binary patches).
Earlier, the types of encoding (either deflated literal or
deflated delta) were stored in is_binary field in struct patch,
which meant that we cannot store more than one fragment that
differ in the encoding for a patch. This moves the information
to a field in struct fragment that is otherwise unused for
binary patches, and makes it possible to hang two (or more, but
two is enough) hunks for a binary patch.
The original "binary patch" output from git-diff is internally
parsed into an "is_binary" patch with one fragment. Upcoming
reversible binary patch output will have two fragments, the
first one being the forward patch and the second one the reverse
patch.
Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'sha1_name.c')
0 files changed, 0 insertions, 0 deletions