From: Matthieu Moy <Matthieu.Moy@imag.fr>
To: git@vger.kernel.org, gitster@pobox.com
Cc: Matthieu Moy <Matthieu.Moy@imag.fr>
Subject: [PATCH v2] Document -B<n>[/<m>], -M<n> and -C<n> variants of -B, -M and -C
Date: Mon, 2 Aug 2010 13:12:07 +0200 [thread overview]
Message-ID: <1280747527-30444-1-git-send-email-Matthieu.Moy@imag.fr> (raw)
In-Reply-To: <7vk4ocrkfa.fsf@alter.siamese.dyndns.org>
These options take an optional argument, but this optional argument was
not documented.
While we're there, fix a typo in a comment in diffcore.h.
Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
---
Here's a new version. I've eliminated "line" from the wording. I'm
still not sure I'm technically correct, especially about the
interaction between "n" and "m" (the "A rewrite is considered when
both thresholds are reached par of the patch).
Documentation/diff-options.txt | 24 +++++++++++++++++++-----
diffcore.h | 2 +-
2 files changed, 20 insertions(+), 6 deletions(-)
diff --git a/Documentation/diff-options.txt b/Documentation/diff-options.txt
index 2371262..f1ab4e7 100644
--- a/Documentation/diff-options.txt
+++ b/Documentation/diff-options.txt
@@ -206,10 +206,22 @@ endif::git-format-patch[]
the diff-patch output format. Non default number of
digits can be specified with `--abbrev=<n>`.
--B::
- Break complete rewrite changes into pairs of delete and create.
-
--M::
+-B[<n>]::
+-B<n>/<m>::
+ Break complete rewrite changes into pairs of delete and
+ create. When `n` and/or `m` are specified, they give threshold
+ (as a percentage of changed content) above which a change is
+ considered as complete rewrite. `n` is a threshold on the
+ similarity index (i.e. amount of addition/deletions compared
+ to the file's size). For example, `-B90%` means git will
+ detect a rewrite if more than 90% of the file's content have
+ been modified. `m` is a threshold on the disimilarity index
+ (i.e. amount of deletions from the old version). A rewrite is
+ considered when both thresholds are reached. When either `n`
+ or `m` is not specified, the default applies (`n` = 50% and
+ `m` = 60%). See linkgit:gitdiffcore[7] for more details.
+
+-M[<n>]::
ifndef::git-log[]
Detect renames.
endif::git-log[]
@@ -218,9 +230,11 @@ ifdef::git-log[]
For following files across renames while traversing history, see
`--follow`.
endif::git-log[]
+ If `n` is specified, it has the same meaning as for `-B<n>`.
--C::
+-C[<n>]::
Detect copies as well as renames. See also `--find-copies-harder`.
+ If `n` is specified, it has the same meaning as for `-B<n>`.
ifndef::git-format-patch[]
--diff-filter=[ACDMRTUXB*]::
diff --git a/diffcore.h b/diffcore.h
index 491bea0..fed9b15 100644
--- a/diffcore.h
+++ b/diffcore.h
@@ -18,7 +18,7 @@
#define MAX_SCORE 60000.0
#define DEFAULT_RENAME_SCORE 30000 /* rename/copy similarity minimum (50%) */
#define DEFAULT_BREAK_SCORE 30000 /* minimum for break to happen (50%) */
-#define DEFAULT_MERGE_SCORE 36000 /* maximum for break-merge to happen 60%) */
+#define DEFAULT_MERGE_SCORE 36000 /* maximum for break-merge to happen (60%) */
#define MINIMUM_BREAK_SIZE 400 /* do not break a file smaller than this */
--
1.7.2.1.10.g5cb67a
next prev parent reply other threads:[~2010-08-02 11:14 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-28 9:43 [RFC/PATCH] Document -B<n>[/<m>], -M<n> and -C<n> variants of -B, -M and -C Matthieu Moy
2010-07-29 16:10 ` Junio C Hamano
2010-07-30 15:23 ` Matthieu Moy
2010-07-30 16:42 ` Junio C Hamano
2010-08-02 11:12 ` Matthieu Moy [this message]
2010-08-02 18:18 ` [PATCH v2] " Junio C Hamano
2010-08-05 16:09 ` Matthieu Moy
2010-08-05 16:14 ` [PATCH] " Matthieu Moy
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=1280747527-30444-1-git-send-email-Matthieu.Moy@imag.fr \
--to=matthieu.moy@imag.fr \
--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.
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).