diff options
author | Junio C Hamano <junkio@cox.net> | 2006-08-27 17:51:05 -0700 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2006-08-27 17:51:05 -0700 |
commit | b32d37a3a6817ba307062fe2f7b6d9cfb85a1ebd (patch) | |
tree | ea8f2b5b30822c350cd9b5e6428d86ee53c706f8 /diff.c | |
parent | 2e6183840e5c8f1a478975346549be7440405175 (diff) | |
parent | 8938045a4eae7a9c39631508a3c3d34c50c6257a (diff) | |
download | git-b32d37a3a6817ba307062fe2f7b6d9cfb85a1ebd.tar.gz git-b32d37a3a6817ba307062fe2f7b6d9cfb85a1ebd.tar.xz |
Merge branch 'jc/apply'
* jc/apply:
git-apply --reject: finishing touches.
apply --reject: count hunks starting from 1, not 0
git-apply --verbose
git-apply --reject: send rejects to .rej files.
git-apply --reject
apply --reverse: tie it all together.
diff.c: make binary patch reversible.
builtin-apply --reverse: two bugfixes.
Diffstat (limited to 'diff.c')
-rw-r--r-- | diff.c | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -838,7 +838,7 @@ static unsigned char *deflate_it(char *data, return deflated; } -static void emit_binary_diff(mmfile_t *one, mmfile_t *two) +static void emit_binary_diff_body(mmfile_t *one, mmfile_t *two) { void *cp; void *delta; @@ -849,7 +849,6 @@ static void emit_binary_diff(mmfile_t *one, mmfile_t *two) unsigned long deflate_size; unsigned long data_size; - printf("GIT binary patch\n"); /* We could do deflated delta, or we could do just deflated two, * whichever is smaller. */ @@ -898,6 +897,13 @@ static void emit_binary_diff(mmfile_t *one, mmfile_t *two) free(data); } +static void emit_binary_diff(mmfile_t *one, mmfile_t *two) +{ + printf("GIT binary patch\n"); + emit_binary_diff_body(one, two); + emit_binary_diff_body(two, one); +} + #define FIRST_FEW_BYTES 8000 static int mmfile_is_binary(mmfile_t *mf) { |