Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/diff.c
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2019-03-05 15:30:13 +0300
committerJunio C Hamano <gitster@pobox.com>2019-03-07 02:02:21 +0300
commit4fe016721500c1874fffc25a86e36bd3541c6a38 (patch)
tree30a8bf1a25a8a91bdadf5e6dc8f3a1a6660925d6 /diff.c
parent6d9af6f4dac4079e0ea14a86cbdf6790c1586fce (diff)
diff-parseopt: convert --full-index
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'diff.c')
-rw-r--r--diff.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/diff.c b/diff.c
index 214728c892..3a13ba37fd 100644
--- a/diff.c
+++ b/diff.c
@@ -5131,6 +5131,8 @@ static void prep_parse_options(struct diff_options *options)
OPT_CALLBACK_F(0, "binary", options, NULL,
N_("output a binary diff that can be applied"),
PARSE_OPT_NONEG | PARSE_OPT_NOARG, diff_opt_binary),
+ OPT_BOOL(0, "full-index", &options->flags.full_index,
+ N_("show full pre- and post-image object names on the \"index\" lines")),
OPT_CALLBACK_F(0, "output-indicator-new",
&options->output_indicators[OUTPUT_INDICATOR_NEW],
N_("<char>"),
@@ -5244,9 +5246,7 @@ int diff_opt_parse(struct diff_options *options,
return ac;
/* flags options */
- if (!strcmp(arg, "--full-index"))
- options->flags.full_index = 1;
- else if (!strcmp(arg, "-a") || !strcmp(arg, "--text"))
+ if (!strcmp(arg, "-a") || !strcmp(arg, "--text"))
options->flags.text = 1;
else if (!strcmp(arg, "-R"))
options->flags.reverse_diff = 1;