git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Yann Dirson <ydirson@altern.org>
To: git@vger.kernel.org
Cc: Yann Dirson <ydirson@altern.org>
Subject: [PATCH 1/2] [RFC] Use --find- instead of --detect- as prefix for long forms of -M and -C.
Date: Wed, 10 Nov 2010 21:27:12 +0100	[thread overview]
Message-ID: <1289420833-20602-2-git-send-email-ydirson@altern.org> (raw)
In-Reply-To: <1289420833-20602-1-git-send-email-ydirson@altern.org>

Rationale: this is both shorter to spell and consistent with
--find-copies-harder.

Signed-off-by: Yann Dirson <ydirson@altern.org>
---
 Documentation/diff-options.txt |    4 ++--
 diff.c                         |    8 ++++----
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/Documentation/diff-options.txt b/Documentation/diff-options.txt
index bfd0b57..ed9c44e 100644
--- a/Documentation/diff-options.txt
+++ b/Documentation/diff-options.txt
@@ -230,7 +230,7 @@ eligible for being picked up as a possible source of a rename to
 another file.
 
 -M[<n>]::
---detect-renames[=<n>]::
+--find-renames[=<n>]::
 ifndef::git-log[]
 	Detect renames.
 endif::git-log[]
@@ -246,7 +246,7 @@ endif::git-log[]
 	hasn't changed.
 
 -C[<n>]::
---detect-copies[=<n>]::
+--find-copies[=<n>]::
 	Detect copies as well as renames.  See also `--find-copies-harder`.
 	If `n` is specified, it has the same meaning as for `-M<n>`.
 
diff --git a/diff.c b/diff.c
index d1c6b91..3837ffd 100644
--- a/diff.c
+++ b/diff.c
@@ -3145,14 +3145,14 @@ int diff_opt_parse(struct diff_options *options, const char **av, int ac)
 		if ((options->break_opt = diff_scoreopt_parse(arg)) == -1)
 			return -1;
 	}
-	else if (!prefixcmp(arg, "-M") || !prefixcmp(arg, "--detect-renames=") ||
-		 !strcmp(arg, "--detect-renames")) {
+	else if (!prefixcmp(arg, "-M") || !prefixcmp(arg, "--find-renames=") ||
+		 !strcmp(arg, "--find-renames")) {
 		if ((options->rename_score = diff_scoreopt_parse(arg)) == -1)
 			return -1;
 		options->detect_rename = DIFF_DETECT_RENAME;
 	}
-	else if (!prefixcmp(arg, "-C") || !prefixcmp(arg, "--detect-copies=") ||
-		 !strcmp(arg, "--detect-copies")) {
+	else if (!prefixcmp(arg, "-C") || !prefixcmp(arg, "--find-copies=") ||
+		 !strcmp(arg, "--find-copies")) {
 		if (options->detect_rename == DIFF_DETECT_COPY)
 			DIFF_OPT_SET(options, FIND_COPIES_HARDER);
 		if ((options->rename_score = diff_scoreopt_parse(arg)) == -1)
-- 
1.7.2.3

  reply	other threads:[~2010-11-10 20:27 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-10 20:27 [PATCH] rationalize diffcore-rename options and their doc Yann Dirson
2010-11-10 20:27 ` Yann Dirson [this message]
2010-11-11 10:47   ` [PATCH 1/2] [RFC] Use --find- instead of --detect- as prefix for long forms of -M and -C Thomas Rast
2010-11-11 11:44     ` Yann Dirson
2010-11-11 22:24       ` Thomas Rast
2010-11-12  7:21         ` Yann Dirson
2010-11-12  3:00   ` Kevin Ballard
2010-11-12  3:56     ` Miles Bader
2010-11-12  7:43     ` Yann Dirson
2010-11-29 22:42     ` Junio C Hamano
2010-11-29 22:52       ` Kevin Ballard
2010-11-30  0:37         ` Junio C Hamano
2010-11-30  7:28           ` [PATCH 1/2] [RFC] Use --find- instead of --detect- as prefix for Yann Dirson
2010-11-29 21:53   ` [PATCH 1/2] [RFC] Use --find- instead of --detect- as prefix for long forms of -M and -C Yann Dirson
2010-11-29 22:44     ` Junio C Hamano
2010-11-10 20:27 ` [PATCH 2/2] Keep together options controlling the behaviour of diffcore-rename Yann Dirson
2010-11-16 17:31   ` Junio C Hamano

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

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

  git send-email \
    --in-reply-to=1289420833-20602-2-git-send-email-ydirson@altern.org \
    --to=ydirson@altern.org \
    --cc=git@vger.kernel.org \
    /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.
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 NNTP newsgroup(s).