git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] http: attempt updating base URL only if no error

From
Jeff King <peff@peff.net>
Date
Feb 28, 2017, 19:58 UTC
Message-ID
<20170228195800.tghcnbtjg3qjrhrv@sigill.intra.peff.net>
In-Reply-To
<6127c0a7-800d-fcf3-c6e2-17533347f07e@google.com>
On Tue, Feb 28, 2017 at 10:48:52AM -0800, Jonathan Tan wrote:
Show 15 quoted lines
> > Running your included test, we get:
> > 
> >   fatal: unable to access 'http://127.0.0.1:5550/redir-to/502/': The
> >   requested URL returned error: 502
> > 
> > but the error really happened in the intermediate step. I wonder if we
> > should show the effective_url in that case, as it's more likely to
> > pinpoint the problem. OTOH, we do not mention the intermediate redirect
> > at all, so they might be confused about where that URL came from. If you
> > really want to debug HTTP confusion, you should use GIT_TRACE_CURL.
> 
> Yeah, if we mention the effective_url, I think that there would need to be a
> lot more explaining to be done (e.g. why does my URL have
> "info/refs?service=git-upload-pack" tacked on at the end). It might be
> better to just recommend GIT_TRACE_CURL.

Indeed. Your comment made me realize that my suggestion was the exact opposite of the earlier d5ccbe4df (remote-curl: consistently report repo url for http errors, 2013-04-05). :)

Given that we don't see a lot of questions on the list about this, either it doesn't come up much, or they are capable of finding GIT_TRACE_CURL or GIT_CURL_VERBOSE on their own. So I think we can leave the message as-is.

-Peff
Previous: Jonathan Tan
Message 4 of 4 in “http: attempt updating base URL only if no error”
  1. http: attempt updating base URL only if no errorJonathan Tan, Feb 28, 2017
  2. Jeff KingFeb 28, 2017
  3. Jonathan TanFeb 28, 2017
  4. Jeff KingFeb 28, 2017

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.