From: Junio C Hamano Date: Thu, 30 May 2019 17:50:46 +0000 (-0700) Subject: Merge branch 'ja/diff-opt-typofix' X-Git-Tag: v2.22.0-rc2~3 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/936dce6f9358afd935cc73c27be7509c07222852?ds=inline;hp=-c Merge branch 'ja/diff-opt-typofix' Typofix. * ja/diff-opt-typofix: diff: fix mistake in translatable strings --- 936dce6f9358afd935cc73c27be7509c07222852 diff --combined diff.c index 80ddc11671,6e87f95645..2068b1c06e --- a/diff.c +++ b/diff.c @@@ -5211,11 -5211,9 +5211,11 @@@ static int diff_opt_unified(const struc BUG_ON_OPT_NEG(unset); - options->context = strtol(arg, &s, 10); - if (*s) - return error(_("%s expects a numerical value"), "--unified"); + if (arg) { + options->context = strtol(arg, &s, 10); + if (*s) + return error(_("%s expects a numerical value"), "--unified"); + } enable_patch_output(&options->output_format); return 0; @@@ -5274,7 -5272,7 +5274,7 @@@ static void prep_parse_options(struct d DIFF_FORMAT_PATCH, DIFF_FORMAT_NO_OUTPUT), OPT_CALLBACK_F('U', "unified", options, N_(""), N_("generate diffs with lines context"), - PARSE_OPT_NONEG, diff_opt_unified), + PARSE_OPT_NONEG | PARSE_OPT_OPTARG, diff_opt_unified), OPT_BOOL('W', "function-context", &options->flags.funccontext, N_("generate diffs with lines context")), OPT_BIT_F(0, "raw", &options->output_format, @@@ -5455,13 -5453,13 +5455,13 @@@ N_("equivalent to --word-diff=color --word-diff-regex="), PARSE_OPT_NONEG | PARSE_OPT_OPTARG, diff_opt_color_words), OPT_CALLBACK_F(0, "color-moved", options, N_(""), - N_("move lines of code are colored differently"), + N_("moved lines of code are colored differently"), PARSE_OPT_OPTARG, diff_opt_color_moved), OPT_CALLBACK_F(0, "color-moved-ws", options, N_(""), N_("how white spaces are ignored in --color-moved"), 0, diff_opt_color_moved_ws), - OPT_GROUP(N_("Diff other options")), + OPT_GROUP(N_("Other diff options")), OPT_CALLBACK_F(0, "relative", options, N_(""), N_("when run from subdir, exclude changes outside and show relative paths"), PARSE_OPT_NONEG | PARSE_OPT_OPTARG,