[PATCH] Documentation/git-update-index.txt: add an example of use

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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





[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux