git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Lars Schneider <larsxschneider@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org, peff@peff.net, tboegi@web.de, e@80x24.org,
	ttaylorr@github.com, peartben@gmail.com
Subject: Re: [PATCH v7 3/6] t0021: write "OUT <size>" only on success
Date: Tue, 27 Jun 2017 22:51:46 +0200	[thread overview]
Message-ID: <BEB23654-54FB-40B0-8C7B-E70D1E5BBCF7@gmail.com> (raw)
In-Reply-To: <xmqqfuel1d9s.fsf@gitster.mtv.corp.google.com>


> On 27 Jun 2017, at 20:44, Junio C Hamano <gitster@pobox.com> wrote:
> 
> Lars Schneider <larsxschneider@gmail.com> 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

  reply	other threads:[~2017-06-27 20:51 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-27 12:10 [PATCH v7 0/6] convert: add "status=delayed" to filter process protocol Lars Schneider
2017-06-27 12:10 ` [PATCH v7 1/6] t0021: keep filter log files on comparison Lars Schneider
2017-06-27 12:10 ` [PATCH v7 2/6] t0021: make debug log file name configurable Lars Schneider
2017-06-27 12:10 ` [PATCH v7 3/6] t0021: write "OUT <size>" only on success Lars Schneider
2017-06-27 18:44   ` Junio C Hamano
2017-06-27 20:51     ` Lars Schneider [this message]
2017-06-27 21:26       ` Junio C Hamano
2017-06-27 12:10 ` [PATCH v7 4/6] convert: put the flags field before the flag itself for consistent style Lars Schneider
2017-06-27 12:10 ` [PATCH v7 5/6] convert: move multiple file filter error handling to separate function Lars Schneider
2017-06-27 12:10 ` [PATCH v7 6/6] convert: add "status=delayed" to filter process protocol Lars Schneider
2017-06-27 19:00   ` Junio C Hamano
2017-06-27 20:34     ` Lars Schneider
2017-06-27 21:30       ` Junio C Hamano
2017-06-27 21:58         ` Lars Schneider
2017-06-27 21:49       ` Lars Schneider

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=BEB23654-54FB-40B0-8C7B-E70D1E5BBCF7@gmail.com \
    --to=larsxschneider@gmail.com \
    --cc=e@80x24.org \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=peartben@gmail.com \
    --cc=peff@peff.net \
    --cc=tboegi@web.de \
    --cc=ttaylorr@github.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).