filter-process: Fix protocol for empty files
authorJoey Hess <joeyh@joeyh.name>
Wed, 13 Jul 2022 21:13:54 +0000 (17:13 -0400)
committerJoey Hess <joeyh@joeyh.name>
Wed, 13 Jul 2022 21:13:54 +0000 (17:13 -0400)
commitfbc3c223a6be27d108f8c9663f443b375d7289ff
tree9615a673d5650f1a164fdee3b71c03893cefa95f
parent1b680d330b902e01bbe01e3e7dc1bde2fe512c0b
filter-process: Fix protocol for empty files

This caused git to complain that filter-process failed and kill it with
signal 15. Because it wrote an extra flushPkt for an empty file, which
git did not expect, and so git saw an unexpected response to the next
request.

Luckily, filter-process is only used by default in v9 and up, and v8 is
still the default. Also, git had to be updating an empty file, followed
by another file, which is a fairly unlikely situation. And git restarts
filter-process after this happens and uses it to filter the rest of the
files. So this isn't a crippling bug.

Sponsored-by: Luke Shumaker on Patreon
CHANGELOG
Git/FilterProcess.hs
doc/bugs/error__58___git-annex_filter-process_died_of_signal_15.mdwn
doc/bugs/error__58___git-annex_filter-process_died_of_signal_15/comment_2_5ebfc18008cf4bc21ffce57067314fc0._comment [new file with mode: 0644]
doc/bugs/error__58___git-annex_filter-process_died_of_signal_15/comment_3_c74018853a4da8e609da1803051a6893._comment [new file with mode: 0644]
doc/bugs/error__58___git-annex_filter-process_died_of_signal_15/comment_4_0a80393f055ead9a3a62da0aa4ec3298._comment [new file with mode: 0644]
doc/bugs/error__58___git-annex_filter-process_died_of_signal_15/comment_5_8b27c6099afea7011717492f53fcdac4._comment [new file with mode: 0644]