summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 792c158)
raw | patch | inline | side by side (parent: 792c158)
author | Junio C Hamano <gitster@pobox.com> | |
Thu, 13 Dec 2007 21:25:07 +0000 (13:25 -0800) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Fri, 14 Dec 2007 07:04:26 +0000 (23:04 -0800) |
This inserts a new function xdi_diff() that currently does not
do anything other than calling the underlying xdl_diff() to the
callchain of current callers of xdl_diff() function.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
do anything other than calling the underlying xdl_diff() to the
callchain of current callers of xdl_diff() function.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin-blame.c | patch | blob | history | |
builtin-rerere.c | patch | blob | history | |
combine-diff.c | patch | blob | history | |
diff.c | patch | blob | history | |
merge-file.c | patch | blob | history | |
merge-tree.c | patch | blob | history | |
xdiff-interface.c | patch | blob | history | |
xdiff-interface.h | patch | blob | history |
diff --git a/builtin-blame.c b/builtin-blame.c
index 5466d01f9a5917dbba4108669ee4513b581ff2c9..99ea0a02cb39bb72b39f147e75a2aa3850bfe3d2 100644 (file)
--- a/builtin-blame.c
+++ b/builtin-blame.c
state.ret->chunks = NULL;
state.ret->num = 0;
- xdl_diff(file_p, file_o, &xpp, &xecfg, &ecb);
+ xdi_diff(file_p, file_o, &xpp, &xecfg, &ecb);
if (state.ret->num) {
struct chunk *chunk;
diff --git a/builtin-rerere.c b/builtin-rerere.c
index 74493237c9ca129cd7398963ace747a04a6bf6fd..37e62481388aecc8ffb9b5943de248f496ca9d13 100644 (file)
--- a/builtin-rerere.c
+++ b/builtin-rerere.c
memset(&xecfg, 0, sizeof(xecfg));
xecfg.ctxlen = 3;
ecb.outf = outf;
- xdl_diff(&minus, &plus, &xpp, &xecfg, &ecb);
+ xdi_diff(&minus, &plus, &xpp, &xecfg, &ecb);
free(minus.ptr);
free(plus.ptr);
diff --git a/combine-diff.c b/combine-diff.c
index 5a658dc0d54f91faee450e4f9ebacc1a6338478f..e22db8993286a3b3654865d765c9e98f3604b44a 100644 (file)
--- a/combine-diff.c
+++ b/combine-diff.c
state.num_parent = num_parent;
state.n = n;
- xdl_diff(&parent_file, result_file, &xpp, &xecfg, &ecb);
+ xdi_diff(&parent_file, result_file, &xpp, &xecfg, &ecb);
free(parent_file.ptr);
/* Assign line numbers for this parent.
index 9c79ee289151e9fc3eb1aaad91dd979bfee63102..3dd2f35f7364341bcb5f4507ea36d03925fdc938 100644 (file)
--- a/diff.c
+++ b/diff.c
ecb.outf = xdiff_outf;
ecb.priv = diff_words;
diff_words->xm.consume = fn_out_diff_words_aux;
- xdl_diff(&minus, &plus, &xpp, &xecfg, &ecb);
+ xdi_diff(&minus, &plus, &xpp, &xecfg, &ecb);
free(minus.ptr);
free(plus.ptr);
if (DIFF_OPT_TST(o, COLOR_DIFF_WORDS))
ecbdata.diff_words =
xcalloc(1, sizeof(struct diff_words_data));
- xdl_diff(&mf1, &mf2, &xpp, &xecfg, &ecb);
+ xdi_diff(&mf1, &mf2, &xpp, &xecfg, &ecb);
if (DIFF_OPT_TST(o, COLOR_DIFF_WORDS))
free_diff_words_data(&ecbdata);
}
xpp.flags = XDF_NEED_MINIMAL | o->xdl_opts;
ecb.outf = xdiff_outf;
ecb.priv = diffstat;
- xdl_diff(&mf1, &mf2, &xpp, &xecfg, &ecb);
+ xdi_diff(&mf1, &mf2, &xpp, &xecfg, &ecb);
}
free_and_return:
xpp.flags = XDF_NEED_MINIMAL;
ecb.outf = xdiff_outf;
ecb.priv = &data;
- xdl_diff(&mf1, &mf2, &xpp, &xecfg, &ecb);
+ xdi_diff(&mf1, &mf2, &xpp, &xecfg, &ecb);
}
free_and_return:
diff_free_filespec_data(one);
@@ -2898,7 +2898,7 @@ static int diff_get_patch_id(struct diff_options *options, unsigned char *sha1)
xecfg.flags = XDL_EMIT_FUNCNAMES;
ecb.outf = xdiff_outf;
ecb.priv = &data;
- xdl_diff(&mf1, &mf2, &xpp, &xecfg, &ecb);
+ xdi_diff(&mf1, &mf2, &xpp, &xecfg, &ecb);
}
SHA1_Final(sha1, &ctx);
diff --git a/merge-file.c b/merge-file.c
index 1e031eafe0c70eec092a53e8ab291b9887622b0e..2a939c9dd835a7e7946eb1548e4cf637ae3ca329 100644 (file)
--- a/merge-file.c
+++ b/merge-file.c
res->size = 0;
ecb.priv = res;
- return xdl_diff(f1, f2, &xpp, &xecfg, &ecb);
+ return xdi_diff(f1, f2, &xpp, &xecfg, &ecb);
}
void *merge_file(struct blob *base, struct blob *our, struct blob *their, unsigned long *size)
diff --git a/merge-tree.c b/merge-tree.c
index 7d4f628444058d80e798e141285d558fb7104c5b..e08324686cc090fa9bd94d7f069b025454c7acdf 100644 (file)
--- a/merge-tree.c
+++ b/merge-tree.c
if (!dst.ptr)
size = 0;
dst.size = size;
- xdl_diff(&src, &dst, &xpp, &xecfg, &ecb);
+ xdi_diff(&src, &dst, &xpp, &xecfg, &ecb);
free(src.ptr);
free(dst.ptr);
}
diff --git a/xdiff-interface.c b/xdiff-interface.c
index be866d12d38f6f1328f5fae8c7108176d4ecba70..69a022c134e422abe7c9c1888f59332797ba1eba 100644 (file)
--- a/xdiff-interface.c
+++ b/xdiff-interface.c
return 0;
}
+int xdi_diff(mmfile_t *mf1, mmfile_t *mf2, xpparam_t const *xpp, xdemitconf_t const *xecfg, xdemitcb_t *xecb)
+{
+ return xdl_diff(mf1, mf2, xpp, xecfg, xecb);
+}
+
int read_mmfile(mmfile_t *ptr, const char *filename)
{
struct stat st;
diff --git a/xdiff-interface.h b/xdiff-interface.h
index fb742dbb6ba2125b970b9d9510e208ec99954a2d..f7f791d96b9a34ef0f08db4b007c5309b9adc3d6 100644 (file)
--- a/xdiff-interface.h
+++ b/xdiff-interface.h
unsigned long remainder_size;
};
+int xdi_diff(mmfile_t *mf1, mmfile_t *mf2, xpparam_t const *xpp, xdemitconf_t const *xecfg, xdemitcb_t *ecb);
int xdiff_outf(void *priv_, mmbuffer_t *mb, int nbuf);
int parse_hunk_header(char *line, int len,
int *ob, int *on,