Git development
 help / color / mirror / Atom feed
From: "Elijah Newren via GitGitGadget" <gitgitgadget@gmail.com>
To: git@vger.kernel.org
Cc: Elijah Newren <newren@gmail.com>, Elijah Newren <newren@gmail.com>
Subject: [PATCH v2] diff: avoid misleading statement about -l option
Date: Fri, 14 Aug 2026 02:06:26 +0000	[thread overview]
Message-ID: <pull.2035.v2.git.1786673186855.gitgitgadget@gmail.com> (raw)
In-Reply-To: <pull.2035.git.1786516958048.gitgitgadget@gmail.com>

From: Elijah Newren <newren@gmail.com>

In commit 6623a528e00b (doc: clarify documentation for rename/copy
limits, 2021-07-15), the wording around rename limit options and config
variables were updated to point out that only the quadratic portion of
rename detection (or "exhaustive portion of rename/copy detection" as
used in that commit) was limited by these options, because exact rename
detection and basename-guided rename detection (which both run in time
linear in the number of files) still run before this limit is checked.

However, the short help message wasn't updated at the time; update it
too.

Signed-off-by: Elijah Newren <newren@gmail.com>
---
    diff: avoid misleading statement about -l option
    
    Changes since v1:
    
     * Fixed author to match signoff
     * Simplified the wording a bit, along the lines of Junio's suggestion

Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-2035%2Fnewren%2Fdiff-l-option-doc-v2
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-2035/newren/diff-l-option-doc-v2
Pull-Request: https://github.com/gitgitgadget/git/pull/2035

Range-diff vs v1:

 1:  6253e1dc96 ! 1:  58729a71ce diff: avoid misleading statement about -l option
     @@
       ## Metadata ##
     -Author: Elijah Newren <newren@github.com>
     +Author: Elijah Newren <newren@gmail.com>
      
       ## Commit message ##
          diff: avoid misleading statement about -l option
     @@ diff.c: struct option *add_diff_options(const struct option *opts,
       			       PARSE_OPT_NOARG, diff_opt_follow),
       		OPT_INTEGER('l', NULL, &options->rename_limit,
      -			    N_("prevent rename/copy detection if the number of rename/copy targets exceeds given limit")),
     -+			    N_("prevent exhaustive portion of rename/copy detection if the number of rename/copy targets exceeds given limit")),
     ++			    N_("limit to cheap rename/copy detection if the number of rename/copy targets exceeds this value")),
       
       		OPT_GROUP(N_("Diff algorithm options")),
       		OPT_CALLBACK_F(0, "minimal", options, NULL,


 diff.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/diff.c b/diff.c
index 589c1969e4..c593066592 100644
--- a/diff.c
+++ b/diff.c
@@ -6186,7 +6186,7 @@ struct option *add_diff_options(const struct option *opts,
 			       N_("continue listing the history of a file beyond renames"),
 			       PARSE_OPT_NOARG, diff_opt_follow),
 		OPT_INTEGER('l', NULL, &options->rename_limit,
-			    N_("prevent rename/copy detection if the number of rename/copy targets exceeds given limit")),
+			    N_("limit to cheap rename/copy detection if the number of rename/copy targets exceeds this value")),
 
 		OPT_GROUP(N_("Diff algorithm options")),
 		OPT_CALLBACK_F(0, "minimal", options, NULL,

base-commit: 2c78326f810173a4f3aefd8021f1e07575412481
-- 
gitgitgadget

  parent reply	other threads:[~2026-08-14  2:06 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-12  6:42 [PATCH] diff: avoid misleading statement about -l option Elijah Newren via GitGitGadget
2026-08-12 14:22 ` Junio C Hamano
2026-08-12 15:42   ` Elijah Newren
2026-08-14  2:06 ` Elijah Newren via GitGitGadget [this message]
2026-08-14 14:26   ` [PATCH v2] " 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=pull.2035.v2.git.1786673186855.gitgitgadget@gmail.com \
    --to=gitgitgadget@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=newren@gmail.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