Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6727617
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T10:04:15+00:00 2026-05-26T10:04:15+00:00

I’m pushing the local commit to the remote git server and got the following

  • 0

I’m pushing the local commit to the remote git server and got the following warning messages:

remote: warning: only found copies from modified paths due to too many files.
remote: warning: you may want to set your diff.renamelimit variable to at least 19824 and retry the command.

But actually I’ve already set the diff.renamelimit to 0 (I think zero means unlimited, right?).

$ git config --list
...
diff.renamelimit=0

So what shall I do to avoid this warning? Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T10:04:15+00:00Added an answer on May 26, 2026 at 10:04 am

    The documentation doesn’t mention 0 as a special value for diff.renamelimit.
    So you should set that limit to the value recommended.
    Or you can try deactivating the rename detection altogether. (git config diff.renames 0)

    You will find a similar example in this blog post "Confluence, git, rename, merge oh my…":

    As already mentioned, git tries to detect file renames after that fact, for example when using git log or git diff/merge.
    When trying to detect renames git distinguishes between exact and inexact renames with the former being a rename without changing the content of the file and the latter a rename that might include changes to the content of the file (e.g. renaming/moving a Java Class).
    This distinction is important because the algorithm for detecting exact renames is linear and will always be executed while the algorithm for inexact rename detection is quadratic ( O(n^2) ) and git does not attempt to do this if the number of files changed exceeds a certain threshold (1000 by default).

    As the number of files affected by the recent reorganisation exceeds this threshold, git simply gives up and leaves the merge resolution up to the developer. In our case we can avoid doing manual merge resolution though by changing the threshold


    Note: Git 2.16 (Q1 2018) will amend that limit:

    Historically, the diff machinery for rename detection had a
    hardcoded limit of 32k paths; this is being lifted to allow users
    trade cycles with a (possibly) easier to read result.

    See commit 8997355 (29 Nov 2017) by Jonathan Tan (jhowtan).
    See commit 9268cf4, commit 9f7e4bf, commit d6861d0, commit b520abf (13 Nov 2017) by Elijah Newren (newren).
    (Merged by Junio C Hamano — gitster — in commit 6466854, 19 Dec 2017)

    diff: remove silent clamp of renameLimit

    In commit 0024a54 (Fix the rename detection limit checking; Sept. 2007, Git v1.5.3.2), the renameLimit was clamped to 32767.
    This appears to have been to simply avoid integer overflow in the following computation:

    num_create * num_src <= rename_limit * rename_limit
    

    Although it also could be viewed as a hard-coded bound on the amount of CPU
    time we’re willing to allow users to tell git to spend on handling
    renames.
    An upper bound may make sense, but unfortunately this upper
    bound was neither communicated to the users, nor documented anywhere.

    Although large limits can make things slow, we have users who would be
    ecstatic to have a small five file change be correctly cherry picked even if they have to manually specify a large limit and wait ten minutes for the renames to be detected.

    Existing scripts and tools that use "-l0" to continue working, treating 0 as a special value indicating that the rename limit is to be a very large number.


    Git 2.17 (Q2 2018) will avoid showing a warning message in the middle of a line of "git diff" output.

    See commit 4e056c9 (16 Jan 2018) by Nguyễn Thái Ngọc Duy (pclouds).
    (Merged by Junio C Hamano — gitster — in commit 17c8e0b, 13 Feb 2018)

    diff.c: flush stdout before printing rename warnings

    The diff output is buffered in a FILE object and could still be
    partially buffered when we print these warnings (directly to fd 2).
    The output is messed up like this

    worktree.c                                   |   138 +-
    worktree.h        warning: inexact rename detection was skipped due to too many files.
                                                 |    12 +-
    wrapper.c                                    |    83 +-
    

    It gets worse if the warning is printed after color codes for the graph part are already printed. You’ll get a warning in green or red.

    Flush stdout first, so we can get something like this instead:

    xdiff/xutils.c                               |    42 +-
    xdiff/xutils.h                               |     4 +-
    1033 files changed, 150824 insertions(+), 69395 deletions(-)
    warning: inexact rename detection was skipped due to too many files.
    

    With Git 2.33 (Q3 2021), documentation on "git diff -l<n>"(man) and diff.renameLimit have been updated, and the defaults for these limits have been raised.

    See commit 94b82d5, commit 9dd29db, commit 6623a52, commit 05d2c61 (15 Jul 2021) by Elijah Newren (newren).
    (Merged by Junio C Hamano — gitster — in commit 268055b, 28 Jul 2021)

    diffcore-rename: treat a rename_limit of 0 as unlimited

    Signed-off-by: Elijah Newren

    In commit 8997355 ("diffcore-rename: make diff-tree -l0 mean -l", 2017-11-29, Git v2.16.0-rc0 — merge listed in batch #10), -l0 was given a special magical "large" value, but one which was not large enough for some uses (as can be seen from commit 9f7e4bf ("diff: remove silent clamp of renameLimit", 2017-11-13, Git v2.16.0-rc0 — merge listed in batch #10).
    Make 0 (or a negative value) be treated as unlimited instead and update the documentation to mention this.

    diff-options now includes in its man page:

    Note that a value of 0 is treated as unlimited.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
For some reason, after submitting a string like this Jack’s Spindle from a text
I've got a string that has curly quotes in it. I'd like to replace
I want use html5's new tag to play a wav file (currently only supported
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and
I am currently running into a problem where an element is coming back from
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I ran into a problem. Wrote the following code snippet: teksti = teksti.Trim() teksti
I have a text area in my form which accepts all possible characters from
Does anyone know how can I replace this 2 symbol below from the string

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.