Git development
 help / color / mirror / Atom feed
* [PATCH] Documentation/git-update-index.txt: add an example of use
@ 2024-12-01 22:25 Matěj Cepl
  2024-12-02  3:01 ` Junio C Hamano
  0 siblings, 1 reply; 3+ messages in thread
From: Matěj Cepl @ 2024-12-01 22:25 UTC (permalink / raw)
  To: git; +Cc: Matěj Cepl

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


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-12-02  7:01 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-01 22:25 [PATCH] Documentation/git-update-index.txt: add an example of use Matěj Cepl
2024-12-02  3:01 ` Junio C Hamano
2024-12-02  6:56   ` Matěj Cepl

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox