[PATCH] Documentation/git-update-index.txt: add an example of use
I met this command in the wild and I spent a lot of time to
understand what it is good for.
---
Documentation/git-update-index.txt | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/Documentation/git-update-index.txt b/Documentation/git-update-index.txt
index 7128aed540..da11cbc418 100644
--- a/Documentation/git-update-index.txt
+++ b/Documentation/git-update-index.txt
@@ -399,6 +399,15 @@ M foo.c
<8> you can tell about the change after the fact.
<9> now it checks with lstat(2) and finds it has been changed.
+To speed up other Git commands that rely on the index, such as git status
+or git commit, user can refresh the index and avoid having to re-check
+the status of every file in the working directory. This command
+doesn't modify any committed data in your repository.
++
+----------------
+$ git update-index -q --refresh || true
+----------------
+
SKIP-WORKTREE BIT
-----------------
--
2.47.1