Web lists-archives.com

Re: [PATCH v1] add status config and command line options for rename detection






On 5/9/2018 11:59 AM, Duy Nguyen wrote:
On Wed, May 9, 2018 at 4:42 PM, Ben Peart <Ben.Peart@xxxxxxxxxxxxx> wrote:
Add a new config status.renames setting to enable turning off rename detection
during status.  This setting will default to the value of diff.renames.

Please add the reason you need this config key in the commit message.
My guess (probably correct) is on super large repo (how large?),
rename detection is just too slow (how long?) that it practically
makes git-status unusable.


Yes, the reasons for this change are the same as for the patch that added these same flags for merge and have to do with the poor performance of rename detection with large repos. I'll update the commit message to be more descriptive (see below) and correct some spelling errors.


add status config and command line options for rename detection

After performing a merge that has conflicts, git status will by default attempt to detect renames which causes many objects to be examined. In a virtualized repo, those objects do not exist locally so the rename logic triggers them to be fetched from the server. This results in the status call taking hours to complete on very large repos. Even in a small repo (the GVFS repo) turning off break and rename detection has a significant impact:

git status --no-renames:
31 secs., 105 loose object downloads

git status --no-breaks
7 secs., 17 loose object downloads

git status --no-breaks --no-renames
1 sec., 1 loose object download

Add a new config status.renames setting to enable turning off rename detection during status. This setting will default to the value of diff.renames.

Add a new config status.renamelimit setting to to enable bounding the time spent finding out inexact renames during status. This setting will default to the value of diff.renamelimit.

Add status --no-renames command line option that enables overriding the config setting from the command line. Add --find-renames[=<n>] to enable detecting renames and optionally setting the similarity index from the command line.

Note: I removed the --no-breaks command line option from the original patch as it will no longer be needed once the default has been changed [1] to turn it off.

[1] https://public-inbox.org/git/20180430093421.27551-2-eckhard.s.maass@xxxxxxxxx/

Original-Patch-by: Alejandro Pauly <alpauly@xxxxxxxxxxxxx>
Signed-off-by: Ben Peart <Ben.Peart@xxxxxxxxxxxxx>


This information could be helpful when we optimize rename detection to
be more efficient.


Add a new config status.renamelimit setting to to enable bounding the time spent
finding out inexact renames during status.  This setting will default to the
value of diff.renamelimit.

Add status --no-renames command line option that enables overriding the config
setting from the command line. Add --find-renames[=<n>] to enable detecting
renames and optionaly setting the similarity index from the command line.

Origional-Patch-by: Alejandro Pauly <alpauly@xxxxxxxxxxxxx>
Signed-off-by: Ben Peart <Ben.Peart@xxxxxxxxxxxxx>