From: Junio C Hamano Date: Mon, 15 Apr 2013 19:41:01 +0000 (-0700) Subject: Merge branch 'jk/diff-graph-submodule-summary' X-Git-Tag: v1.8.3-rc0~68 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/f678d9b5923b030287687dde020240c2d4709d79?hp=-c Merge branch 'jk/diff-graph-submodule-summary' Make "git diff --graph" work better with submodule log output. * jk/diff-graph-submodule-summary: submodule: print graph output next to submodule log --- f678d9b5923b030287687dde020240c2d4709d79 diff --combined diff.c index 649ec86b87,28a742c248..f0b3e7cfe3 --- a/diff.c +++ b/diff.c @@@ -1565,7 -1565,7 +1565,7 @@@ static void show_stats(struct diffstat_ * Binary files are displayed with "Bin XXX -> YYY bytes" * instead of the change count and graph. This part is treated * similarly to the graph part, except that it is not - * "scaled". If total width is too small to accomodate the + * "scaled". If total width is too small to accommodate the * guaranteed minimum width of the filename part and the * separators and this message, this message will "overflow" * making the line longer than the maximum width. @@@ -2255,6 -2255,7 +2255,7 @@@ static void builtin_diff(const char *na const char *del = diff_get_color_opt(o, DIFF_FILE_OLD); const char *add = diff_get_color_opt(o, DIFF_FILE_NEW); show_submodule_summary(o->file, one ? one->path : two->path, + line_prefix, one->sha1, two->sha1, two->dirty_submodule, meta, del, add, reset); return; @@@ -3596,8 -3597,8 +3597,8 @@@ int diff_opt_parse(struct diff_options options->xdl_opts = DIFF_WITH_ALG(options, PATIENCE_DIFF); else if (!strcmp(arg, "--histogram")) options->xdl_opts = DIFF_WITH_ALG(options, HISTOGRAM_DIFF); - else if (!prefixcmp(arg, "--diff-algorithm=")) { - long value = parse_algorithm_value(arg+17); + else if ((argcount = parse_long_opt("diff-algorithm", av, &optarg))) { + long value = parse_algorithm_value(optarg); if (value < 0) return error("option diff-algorithm accepts \"myers\", " "\"minimal\", \"patience\" and \"histogram\""); @@@ -3605,7 -3606,6 +3606,7 @@@ DIFF_XDL_CLR(options, NEED_MINIMAL); options->xdl_opts &= ~XDF_DIFF_ALGORITHM_MASK; options->xdl_opts |= value; + return argcount; } /* flags options */