Documentation: add caveats about I/O buffering for check-{attr,ignore}
check-attr and check-ignore have the potential to deadlock callers which do not read back the output in real-time. For example, if a caller writes N paths out and then reads N lines back in, it risks becoming blocked on write() to check-*, and check-* is blocked on write back to the caller. Somebody has to buffer; the pipe buffers provide some leeway, but they are limited. Thanks to Peff for pointing this out: http://article.gmane.org/gmane.comp.version-control.git/220534 Signed-off-by: Adam Spiers <git@adamspiers.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>maint
parent
0c8e8c080b
commit
f1ed7fea79
|
@ -56,6 +56,11 @@ being queried and <info> can be either:
|
||||||
'set';; when the attribute is defined as true.
|
'set';; when the attribute is defined as true.
|
||||||
<value>;; when a value has been assigned to the attribute.
|
<value>;; when a value has been assigned to the attribute.
|
||||||
|
|
||||||
|
Buffering happens as documented under the `GIT_FLUSH` option in
|
||||||
|
linkgit:git[1]. The caller is responsible for avoiding deadlocks
|
||||||
|
caused by overfilling an input buffer or reading from an empty output
|
||||||
|
buffer.
|
||||||
|
|
||||||
EXAMPLES
|
EXAMPLES
|
||||||
--------
|
--------
|
||||||
|
|
||||||
|
|
|
@ -81,6 +81,11 @@ not. (Without this option, it would be impossible to tell whether the
|
||||||
absence of output for a given file meant that it didn't match any
|
absence of output for a given file meant that it didn't match any
|
||||||
pattern, or that the output hadn't been generated yet.)
|
pattern, or that the output hadn't been generated yet.)
|
||||||
|
|
||||||
|
Buffering happens as documented under the `GIT_FLUSH` option in
|
||||||
|
linkgit:git[1]. The caller is responsible for avoiding deadlocks
|
||||||
|
caused by overfilling an input buffer or reading from an empty output
|
||||||
|
buffer.
|
||||||
|
|
||||||
EXIT STATUS
|
EXIT STATUS
|
||||||
-----------
|
-----------
|
||||||
|
|
||||||
|
|
|
@ -771,8 +771,9 @@ for further details.
|
||||||
'GIT_FLUSH'::
|
'GIT_FLUSH'::
|
||||||
If this environment variable is set to "1", then commands such
|
If this environment variable is set to "1", then commands such
|
||||||
as 'git blame' (in incremental mode), 'git rev-list', 'git log',
|
as 'git blame' (in incremental mode), 'git rev-list', 'git log',
|
||||||
and 'git whatchanged' will force a flush of the output stream
|
'git check-attr', 'git check-ignore', and 'git whatchanged' will
|
||||||
after each commit-oriented record have been flushed. If this
|
force a flush of the output stream after each record have been
|
||||||
|
flushed. If this
|
||||||
variable is set to "0", the output of these commands will be done
|
variable is set to "0", the output of these commands will be done
|
||||||
using completely buffered I/O. If this environment variable is
|
using completely buffered I/O. If this environment variable is
|
||||||
not set, git will choose buffered or record-oriented flushing
|
not set, git will choose buffered or record-oriented flushing
|
||||||
|
|
Loading…
Reference in New Issue