From: Junio C Hamano Date: Sun, 13 Jun 2010 18:20:46 +0000 (-0700) Subject: Merge branch 'rs/diff-no-minimal' X-Git-Tag: v1.7.2-rc0~88 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=39b5977b1391b0ee1fdfecf04955c32192f64936;p=git.git Merge branch 'rs/diff-no-minimal' * rs/diff-no-minimal: git diff too slow for a file --- 39b5977b1391b0ee1fdfecf04955c32192f64936 diff --cc builtin/merge-file.c index 610849a65,e5e860fa7..b8e9e5ba0 --- a/builtin/merge-file.c +++ b/builtin/merge-file.c @@@ -25,21 -25,20 +25,21 @@@ int cmd_merge_file(int argc, const cha const char *names[3] = { NULL, NULL, NULL }; mmfile_t mmfs[3]; mmbuffer_t result = {NULL, 0}; - xmparam_t xmp = {{XDF_NEED_MINIMAL}}; + xmparam_t xmp = {{0}}; int ret = 0, i = 0, to_stdout = 0; - int level = XDL_MERGE_ZEALOUS_ALNUM; - int style = 0, quiet = 0; - int favor = 0; + int quiet = 0; int nongit; - struct option options[] = { OPT_BOOLEAN('p', "stdout", &to_stdout, "send results to standard output"), - OPT_SET_INT(0, "diff3", &style, "use a diff3 based merge", XDL_MERGE_DIFF3), - OPT_SET_INT(0, "ours", &favor, "for conflicts, use our version", + OPT_SET_INT(0, "diff3", &xmp.style, "use a diff3 based merge", XDL_MERGE_DIFF3), + OPT_SET_INT(0, "ours", &xmp.favor, "for conflicts, use our version", XDL_MERGE_FAVOR_OURS), - OPT_SET_INT(0, "theirs", &favor, "for conflicts, use their version", + OPT_SET_INT(0, "theirs", &xmp.favor, "for conflicts, use their version", XDL_MERGE_FAVOR_THEIRS), + OPT_SET_INT(0, "union", &xmp.favor, "for conflicts, use a union version", + XDL_MERGE_FAVOR_UNION), + OPT_INTEGER(0, "marker-size", &xmp.marker_size, + "for conflicts, use this marker size"), OPT__QUIET(&quiet), OPT_CALLBACK('L', NULL, names, "name", "set labels for file1/orig_file/file2", &label_cb), diff --cc diff.c index 494f5601e,0924274dd..302b20557 --- a/diff.c +++ b/diff.c @@@ -1894,9 -1832,10 +1894,9 @@@ static void builtin_diffstat(const cha memset(&xpp, 0, sizeof(xpp)); memset(&xecfg, 0, sizeof(xecfg)); - xpp.flags = XDF_NEED_MINIMAL | o->xdl_opts; + xpp.flags = o->xdl_opts; xdi_diff_outf(&mf1, &mf2, diffstat_consume, diffstat, - &xpp, &xecfg, &ecb); + &xpp, &xecfg); } free_and_return: @@@ -1942,9 -1882,9 +1942,9 @@@ static void builtin_checkdiff(const cha memset(&xpp, 0, sizeof(xpp)); memset(&xecfg, 0, sizeof(xecfg)); xecfg.ctxlen = 1; /* at least one context line */ - xpp.flags = XDF_NEED_MINIMAL; + xpp.flags = 0; xdi_diff_outf(&mf1, &mf2, checkdiff_consume, &data, - &xpp, &xecfg, &ecb); + &xpp, &xecfg); if (data.ws_rule & WS_BLANK_AT_EOF) { struct emit_callback ecbdata;