Merge branch 'jk/no-optional-locks'
authorJunio C Hamano <gitster@pobox.com>
Wed, 13 Dec 2017 21:28:58 +0000 (13:28 -0800)
committerJunio C Hamano <gitster@pobox.com>
Wed, 13 Dec 2017 21:28:58 +0000 (13:28 -0800)
Doc update for a feature available in Git v2.14 and upwards.

* jk/no-optional-locks:
git-status.txt: mention --no-optional-locks

Documentation/git-status.txt
index fc282e0a920c84f491d24e3cf765ca634b54c425..81cab9aefb014690d93f9602ebebc9058c3d168e 100644 (file)
@@ -387,6 +387,19 @@ ignored submodules you can either use the --ignore-submodules=dirty command
 line option or the 'git submodule summary' command, which shows a similar
 output but does not honor these settings.
 
+BACKGROUND REFRESH
+------------------
+
+By default, `git status` will automatically refresh the index, updating
+the cached stat information from the working tree and writing out the
+result. Writing out the updated index is an optimization that isn't
+strictly necessary (`status` computes the values for itself, but writing
+them out is just to save subsequent programs from repeating our
+computation). When `status` is run in the background, the lock held
+during the write may conflict with other simultaneous processes, causing
+them to fail. Scripts running `status` in the background should consider
+using `git --no-optional-locks status` (see linkgit:git[1] for details).
+
 SEE ALSO
 --------
 linkgit:gitignore[5]