diff options
author | Lars Schneider <larsxschneider@gmail.com> | 2017-10-05 12:44:06 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-10-05 20:01:07 +0900 |
commit | 03b95333db32ea92b8a4a61f2f055a900f8d7c84 (patch) | |
tree | a64e7498ca0fd061b3ade90c1fac35cff60ae9c8 /compat/win32 | |
parent | convert: add "status=delayed" to filter process protocol (diff) | |
download | tgif-03b95333db32ea92b8a4a61f2f055a900f8d7c84.tar.xz |
entry.c: update cache entry only for existing files
In 2841e8f ("convert: add "status=delayed" to filter process protocol",
2017-06-30) we taught the filter process protocol to delay responses.
That means an external filter might answer in the first write_entry()
call on a file that requires filtering "I got your request, but I
can't answer right now. Ask again later!". As Git got no answer, we do
not write anything to the filesystem. Consequently, the lstat() call in
the finish block of the function writes garbage to the cache entry.
The garbage is eventually overwritten when the filter answers with
the final file content in a subsequent write_entry() call.
Fix the brief time window of garbage in the cache entry by adding a
special finish block that does nothing for delayed responses. The cache
entry is written properly in a subsequent write_entry() call where
the filter responds with the final file content.
Reported-by: Jeff King <peff@peff.net>
Signed-off-by: Lars Schneider <larsxschneider@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'compat/win32')
0 files changed, 0 insertions, 0 deletions