git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Jeff King <peff@peff.net>
To: Eric Wong <e@80x24.org>
Cc: Wolfgang Denk <wd@denx.de>,
	Heinrich Schuchardt <xypron.glpk@gmx.de>,
	git@vger.kernel.org, Junio C Hamano <gitster@pobox.com>,
	Takahiro Akashi <takahiro.akashi@linaro.org>
Subject: [PATCH 0/3] fix dumb-http fetch with alternates
Date: Sun, 24 Mar 2019 08:07:58 -0400	[thread overview]
Message-ID: <20190324120757.GA18684@sigill.intra.peff.net> (raw)
In-Reply-To: <20190323085341.GA9002@sigill.intra.peff.net>

On Sat, Mar 23, 2019 at 04:53:41AM -0400, Jeff King wrote:

> On Fri, Mar 22, 2019 at 04:50:34PM +0000, Eric Wong wrote:
> 
> > > Weird. I had set http.maxrequests to "1" to give more readable output
> > > from GIT_CURL_VERBOSE, etc. It fails with that setting, but not with the
> > > default of 5. Which certainly seems like a bug, but one that has been
> > > there for a while (at least since v2.9.x, which I tested).
> > 
> > I couldn't reproduce an error after porting your patch to
> > master (commit 041f5ea1cf987a40 "The third batch"):
> > https://80x24.org/spew/20190322163449.25362-1-e@80x24.org/raw
> > 
> > So you might've hit an ephemeral error (bad connection,
> > HTTP server restarting, etc).
> 
> No, it was quite reproducible. Curious, I decided to bisect. The problem
> started in ad75ebe5b3 (http: maintain curl sessions, 2009-11-27), but
> was later fixed by your 2abc848d54 (http: always remove curl easy from
> curlm session on release, 2016-09-13).
> 
> So trying to build the fix directly on 17966c0a63d (which is in between
> those) will run into this unrelated bug. But forward-porting does work.

Here's the patch, forward-ported on top of the current master, with
actual commit messages, a test, and a few subtle tweaks around the
curl_errorstr handling.

  [1/3]: http: factor out curl result code normalization
  [2/3]: http: normalize curl results for dumb loose and alternates fetches
  [3/3]: http: use normalize_curl_result() instead of manual conversion

 http-walker.c              | 21 ++++++++++-----------
 http.c                     | 18 ++++++++++++------
 http.h                     |  9 +++++++++
 t/t5550-http-fetch-dumb.sh | 16 ++++++++++++++++
 4 files changed, 47 insertions(+), 17 deletions(-)

  reply	other threads:[~2019-03-24 12:08 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <7e4a2f1d-2b3a-eb83-d3f1-9ac63d68991b@gmx.de>
     [not found] ` <20190322005107.GL9937@linaro.org>
2019-03-22  6:02   ` [BUG] Cloning with git HEAD fails for some repositories Heinrich Schuchardt
2019-03-22  7:12     ` Jeff King
2019-03-22  8:21       ` Wolfgang Denk
2019-03-22  9:31         ` Jeff King
2019-03-22 16:50           ` Eric Wong
2019-03-22 17:42             ` Heinrich Schuchardt
2019-03-22 18:09               ` Eric Wong
2019-03-22 18:41                 ` Heinrich Schuchardt
2019-03-22 20:35                   ` Eric Wong
2019-03-23  8:53             ` Jeff King
2019-03-24 12:07               ` Jeff King [this message]
2019-03-24 12:08                 ` [PATCH 1/3] http: factor out curl result code normalization Jeff King
2019-03-24 12:09                 ` [PATCH 2/3] http: normalize curl results for dumb loose and alternates fetches Jeff King
2019-03-24 12:13                 ` [PATCH 3/3] http: use normalize_curl_result() instead of manual conversion Jeff King

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=20190324120757.GA18684@sigill.intra.peff.net \
    --to=peff@peff.net \
    --cc=e@80x24.org \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=takahiro.akashi@linaro.org \
    --cc=wd@denx.de \
    --cc=xypron.glpk@gmx.de \
    /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).