From: Junio C Hamano Date: Mon, 21 Jun 2010 12:38:50 +0000 (-0700) Subject: Merge branch 'rs/diff-no-minimal' into maint X-Git-Tag: v1.7.2-rc0~7^2~29 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=60335534a6ac52d4d3a372a5b56df5a57a4463d1;p=git-core%2Fgit.git Merge branch 'rs/diff-no-minimal' into maint * rs/diff-no-minimal: git diff too slow for a file --- 60335534a6ac52d4d3a372a5b56df5a57a4463d1 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 e40c1271d,0924274dd..50cf8fb55 --- a/diff.c +++ b/diff.c @@@ -1834,9 -1832,10 +1834,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: @@@ -1882,9 -1882,9 +1882,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;