author | Junio C Hamano <junkio@cox.net> | |
Tue, 15 Aug 2006 09:23:06 +0000 (02:23 -0700) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Tue, 15 Aug 2006 10:11:52 +0000 (03:11 -0700) | ||
commit | 3cd4f5e8eb04ae01298ceaf46bb41a4277031916 | |
tree | ea9ea5824ce4073efe097dd35ae094ba761ccc57 | tree | snapshot |
parent | d1b9944db8f66131b259be407472e53db33718ea | commit | 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>
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>
builtin-apply.c | diff | blob | history |