git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: "Nguyễn Thái Ngọc Duy" <pclouds@gmail.com>
To: git@vger.kernel.org
Cc: "Junio C Hamano" <gitster@pobox.com>,
	"Nguyễn Thái Ngọc Duy" <pclouds@gmail.com>
Subject: [PATCH 08/20] diff-parseopt: convert -a|--text
Date: Tue,  5 Mar 2019 19:30:14 +0700	[thread overview]
Message-ID: <20190305123026.7266-9-pclouds@gmail.com> (raw)
In-Reply-To: <20190305123026.7266-1-pclouds@gmail.com>

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
---
 diff.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/diff.c b/diff.c
index 3a13ba37fd..51d22f63fa 100644
--- a/diff.c
+++ b/diff.c
@@ -5214,6 +5214,8 @@ static void prep_parse_options(struct diff_options *options)
 			       N_("when run from subdir, exclude changes outside and show relative paths"),
 			       PARSE_OPT_NONEG | PARSE_OPT_OPTARG,
 			       diff_opt_relative),
+		OPT_BOOL('a', "text", &options->flags.text,
+			 N_("treat all files as text")),
 		{ OPTION_CALLBACK, 0, "output", options, N_("<file>"),
 		  N_("Output to a specific file"),
 		  PARSE_OPT_NONEG, NULL, 0, diff_opt_output },
@@ -5246,9 +5248,7 @@ int diff_opt_parse(struct diff_options *options,
 		return ac;
 
 	/* flags options */
-	if (!strcmp(arg, "-a") || !strcmp(arg, "--text"))
-		options->flags.text = 1;
-	else if (!strcmp(arg, "-R"))
+	if (!strcmp(arg, "-R"))
 		options->flags.reverse_diff = 1;
 	else if (!strcmp(arg, "--follow"))
 		options->flags.follow_renames = 1;
-- 
2.21.0.rc1.337.gdf7f8d0522


  parent reply	other threads:[~2019-03-05 12:31 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-05 12:30 [PATCH 00/20] nd/diff-parseopt part 3 Nguyễn Thái Ngọc Duy
2019-03-05 12:30 ` [PATCH 01/20] diff-parseopt: convert --[no-]indent-heuristic Nguyễn Thái Ngọc Duy
2019-03-05 12:30 ` [PATCH 02/20] diff-parseopt: convert --patience Nguyễn Thái Ngọc Duy
2019-03-05 12:30 ` [PATCH 03/20] diff-parseopt: convert --histogram Nguyễn Thái Ngọc Duy
2019-03-05 12:30 ` [PATCH 04/20] diff-parseopt: convert --diff-algorithm Nguyễn Thái Ngọc Duy
2019-03-05 12:30 ` [PATCH 05/20] diff-parseopt: convert --anchored Nguyễn Thái Ngọc Duy
2019-03-05 12:30 ` [PATCH 06/20] diff-parseopt: convert --binary Nguyễn Thái Ngọc Duy
2019-03-05 12:30 ` [PATCH 07/20] diff-parseopt: convert --full-index Nguyễn Thái Ngọc Duy
2019-03-05 12:30 ` Nguyễn Thái Ngọc Duy [this message]
2019-03-05 12:30 ` [PATCH 09/20] diff-parseopt: convert -R Nguyễn Thái Ngọc Duy
2019-03-05 12:30 ` [PATCH 10/20] diff-parseopt: convert --[no-]follow Nguyễn Thái Ngọc Duy
2019-03-05 12:30 ` [PATCH 11/20] diff-parseopt: convert --[no-]color Nguyễn Thái Ngọc Duy
2019-03-05 12:30 ` [PATCH 12/20] diff-parseopt: convert --word-diff Nguyễn Thái Ngọc Duy
2019-03-05 12:30 ` [PATCH 13/20] diff-parseopt: convert --word-diff-regex Nguyễn Thái Ngọc Duy
2019-03-05 12:30 ` [PATCH 14/20] diff-parseopt: convert --color-words Nguyễn Thái Ngọc Duy
2019-03-05 12:30 ` [PATCH 15/20] diff-parseopt: convert --exit-code Nguyễn Thái Ngọc Duy
2019-03-05 12:30 ` [PATCH 16/20] diff-parseopt: convert --quiet Nguyễn Thái Ngọc Duy
2019-03-05 15:42   ` Eric Sunshine
2019-03-06  9:25     ` Duy Nguyen
2019-03-05 12:30 ` [PATCH 17/20] diff-parseopt: convert --ext-diff Nguyễn Thái Ngọc Duy
2019-03-05 12:30 ` [PATCH 18/20] diff-parseopt: convert --textconv Nguyễn Thái Ngọc Duy
2019-03-05 12:30 ` [PATCH 19/20] diff-parseopt: convert --ignore-submodules Nguyễn Thái Ngọc Duy
2019-03-05 12:30 ` [PATCH 20/20] diff-parseopt: convert --submodule Nguyễn Thái Ngọc Duy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190305123026.7266-9-pclouds@gmail.com \
    --to=pclouds@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).