git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[RFC/PATCH] Document -B<n>[/<m>], -M<n> and -C<n> variants of -B, -M and -C

From
Matthieu Moy <matthieu.moy@imag.fr>
Date
Jul 28, 2010, 09:43 UTC
Message-ID
<1280310239-16897-1-git-send-email-Matthieu.Moy@imag.fr>

These options take an optional argument, but this optional argument was not documented.

Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
---
I'm not really happy with my description of -Bn/m, which I essentially
took from eeaa46031479 (Junio, Jun 3 2005, diff: Update -B
heuristics). Someone with better understanding of how it works can
probably propose something better.
 Documentation/diff-options.txt |   18 ++++++++++++++----
 1 files changed, 14 insertions(+), 4 deletions(-)
diff --git a/Documentation/diff-options.txt b/Documentation/diff-options.txt
index 2371262..d07809c 100644
--- a/Documentation/diff-options.txt
+++ b/Documentation/diff-options.txt
@@ -206,10 +206,18 @@ endif::git-format-patch[]
 	the diff-patch output format.  Non default number of
 	digits can be specified with `--abbrev=<n>`.
 
--B::
+-B[<n>]::
+-B<n>/<m>::
 	Break complete rewrite changes into pairs of delete and create.
-
--M::
+	If `n` is specified, it gives the threshold (as a percentage
+	of changed lines) above which a change is considered as
+	complete rewrite.  For example, `-B90%` means git will detect a
+	rewrite if more than 90% of the lines have been modified.  If
+	`m` is specified, then it is the minimum amount of deleted
+	lines a surviving broken pair must have to avoid being merged
+	back together.  See linkgit:gitdiffcore[7] for more details.
+
+-M[<n>]::
 ifndef::git-log[]
 	Detect renames.
 endif::git-log[]
@@ -218,9 +226,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*]::
-- 
1.7.2.25.g9ebe3
Next: Junio C Hamano
Message 1 of 8 in “Document -B<n>[/<m>], -M<n> and -C<n> variants of -B, -M and -C”
  1. Document -B<n>[/<m>], -M<n> and -C<n> variants of -B, -M and -CMatthieu Moy, Jul 28, 2010
  2. Junio C HamanoJul 29, 2010
  3. Matthieu MoyJul 30, 2010
  4. Junio C HamanoJul 30, 2010
  5. Document -B<n>[/<m>], -M<n> and -C<n> variants of -B, -M and -CMatthieu Moy, Aug 2, 2010
  6. Junio C HamanoAug 2, 2010
  7. Matthieu MoyAug 5, 2010
  8. Document -B<n>[/<m>], -M<n> and -C<n> variants of -B, -M and -CMatthieu Moy, Aug 5, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.