git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Ramsay Jones <ramsay@ramsayjones.plus.com>
Cc: GIT Mailing-list <git@vger.kernel.org>,
	Adam Dinwoodie <adam@dinwoodie.org>,
	Johannes Schindelin <Johannes.Schindelin@gmx.de>
Subject: Re: t0301-credential-cache test failure on cygwin
Date: Wed, 06 Jul 2022 23:15:04 -0700	[thread overview]
Message-ID: <xmqqtu7t30uv.fsf@gitster.g> (raw)
In-Reply-To: <9dc3e85f-a532-6cff-de11-1dfb2e4bc6b6@ramsayjones.plus.com> (Ramsay Jones's message of "Thu, 7 Jul 2022 02:50:21 +0100")

Ramsay Jones <ramsay@ramsayjones.plus.com> writes:

> However, I had some time to kill tonight, so I decided to take a _quick_ look
> to see if there was something that could be done ... (famous last words).
> ...
>   diff --git a/builtin/credential-cache.c b/builtin/credential-cache.c
>   index 78c02ad531..84fd513c62 100644
>   --- a/builtin/credential-cache.c
>   +++ b/builtin/credential-cache.c
>   @@ -27,7 +27,7 @@ static int connection_fatally_broken(int error)
>    
>    static int connection_closed(int error)
>    {
>   -	return (error == ECONNRESET);
>   +	return (error == ECONNRESET) || (error == ECONNABORTED);
>    }

This feels like papering over the problem.

> Having noticed that the 'timeout' test was not failing, I decided to try
> making the 'action=exit' code-path behave more like the timeout code, as
> far as exiting the server is concerned. Indeed, you might ask why the
> timeout code doesn't just 'exit(0)' as well ...
>
> Anyway, the following patch does that, and it also provides a 'fix' for this
> issue!

If this codepath was written like this (i.e. [PATCH 1C]) from the
beginning, I would have found it very sensible (i.e. instead of
caling exit() in the middle of the infinite client serving loop,
exiting the loop cleanly is easier to follow and maintain), even if
we didn't know the issue on Cygwin you investigated.


  reply	other threads:[~2022-07-07  6:15 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-07  1:50 t0301-credential-cache test failure on cygwin Ramsay Jones
2022-07-07  6:15 ` Junio C Hamano [this message]
2022-07-07 15:17   ` Ramsay Jones
2022-07-07 18:19     ` Jeff King
2022-07-07 18:29     ` Jeff King
2022-07-07 19:14       ` Ramsay Jones
2022-07-11  7:49     ` Adam Dinwoodie
2022-07-11 13:39       ` Adam Dinwoodie
2022-07-11 14:56         ` Ramsay Jones
2022-07-13 14:42           ` Adam Dinwoodie
2022-07-13 19:16             ` Jeff King
2022-07-13 20:35               ` Ramsay Jones
2022-07-07 18:12 ` Jeff King
2022-07-07 18:26   ` Junio C Hamano
2022-07-07 19:59   ` Ramsay Jones

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

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

  git send-email \
    --in-reply-to=xmqqtu7t30uv.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=adam@dinwoodie.org \
    --cc=git@vger.kernel.org \
    --cc=ramsay@ramsayjones.plus.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.
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 NNTP newsgroup(s).