summaryrefslogtreecommitdiff
path: root/Documentation
diff options
context:
space:
mode:
authorLibravatar Ben Peart <Ben.Peart@microsoft.com>2018-05-11 15:38:58 +0000
committerLibravatar Junio C Hamano <gitster@pobox.com>2018-05-13 10:57:37 +0900
commite8b2dc2c2a8415bfd180ecf5cc237a54e69ac2e9 (patch)
tree9703b9eff442441f54f8673092805fc03cd46d53 /Documentation
parentwt-status: use settings from git_diff_ui_config (diff)
downloadtgif-e8b2dc2c2a8415bfd180ecf5cc237a54e69ac2e9.tar.xz
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 vs seconds with this patch. Add a new config status.renames setting to enable turning off rename detection during status and commit. 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 and commit. This setting will default to the value of diff.renamelimit. Add --no-renames command line option to status that enables overriding the config setting from the command line. Add --find-renames[=<n>] command line option to status that enables detecting renames and optionally setting the similarity index. Reviewed-by: Elijah Newren <newren@gmail.com> Original-Patch-by: Alejandro Pauly <alpauly@microsoft.com> Signed-off-by: Ben Peart <Ben.Peart@microsoft.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/config.txt12
-rw-r--r--Documentation/git-status.txt10
2 files changed, 22 insertions, 0 deletions
diff --git a/Documentation/config.txt b/Documentation/config.txt
index 2659153cb3..88884f1ead 100644
--- a/Documentation/config.txt
+++ b/Documentation/config.txt
@@ -3119,6 +3119,18 @@ status.displayCommentPrefix::
behavior of linkgit:git-status[1] in Git 1.8.4 and previous.
Defaults to false.
+status.renameLimit::
+ The number of files to consider when performing rename detection
+ in linkgit:git-status[1] and linkgit:git-commit[1]. Defaults to
+ the value of diff.renameLimit.
+
+status.renames::
+ Whether and how Git detects renames in linkgit:git-status[1] and
+ linkgit:git-commit[1] . If set to "false", rename detection is
+ disabled. If set to "true", basic rename detection is enabled.
+ If set to "copies" or "copy", Git will detect copies, as well.
+ Defaults to the value of diff.renames.
+
status.showStash::
If set to true, linkgit:git-status[1] will display the number of
entries currently stashed away.
diff --git a/Documentation/git-status.txt b/Documentation/git-status.txt
index c16e27e63d..c4467ffb98 100644
--- a/Documentation/git-status.txt
+++ b/Documentation/git-status.txt
@@ -135,6 +135,16 @@ ignored, then the directory is not shown, but all contents are shown.
Display or do not display detailed ahead/behind counts for the
branch relative to its upstream branch. Defaults to true.
+--renames::
+--no-renames::
+ Turn on/off rename detection regardless of user configuration.
+ See also linkgit:git-diff[1] `--no-renames`.
+
+--find-renames[=<n>]::
+ Turn on rename detection, optionally setting the similarity
+ threshold.
+ See also linkgit:git-diff[1] `--find-renames`.
+
<pathspec>...::
See the 'pathspec' entry in linkgit:gitglossary[7].