> On 27 Jun 2017, at 20:44, Junio C Hamano <[email protected]> wrote:
>
> Lars Schneider <[email protected]> writes:
>
>> "rot13-filter.pl" always writes "OUT <size>" to the debug log at the end
>> of a response.
>>
>> This works without issues for the existing responses "abort", "error",
>> and "success". A new response "delayed", that will be introduced in a
>> subsequent patch, accepts the input without giving the filtered result
>> right away. Since we actually have the data already available in our
>> mock filter the debug log output would be wrong/misleading. Therefore,
>> we do not write "OUT <size>" for "delayed" responses.
>
> I still do not get why you think it makes any difference that you
> are hoarding the result in the mock program. If the filter needs to
> read a prepared result from a file in t/t0021/ before responding to
> a real request after it replies to "delayed", would that change the
> argument above? From Git's and the t0021-conversion.sh test's point
> of view, I do not think it makes an iota of difference---it's an
> implementation detail of the mock program.
>
> I am totally lost.
>
> Isn't the point of removing the log output from response to "delayed"
> that the filter does not give the output back to Git at that point,
> hence generally the size would not be available in the real-world
> use case (not in the mock program)?
Correct! Sorry for the confusion. How about this?
"rot13-filter.pl" always writes "OUT <size>" to the debug log at the end
of a response.
This works perfectly for the existing responses "abort", "error", and
"success". A new response "delayed", that will be introduced in a
subsequent patch, accepts the input without giving the filtered result
right away. At this point we cannot know the size of the response.
Therefore, we do not write "OUT <size>" for "delayed" responses.
To simplify the code we do not write "OUT <size>" for "abort" and
"error" responses either as their size is always zero.
Thanks,
Lars