提交 39a570f2 编写于 作者: J Jeff King 提交者: Junio C Hamano

http: re-word http error message

When we report an http error code, we say something like:

  error: The requested URL reported failure: 403 Forbidden while accessing http://example.com/repo.git

Everything between "error:" and "while" is written by curl,
and the resulting sentence is hard to read (especially
because there is no punctuation between curl's sentence and
the remainder of ours). Instead, let's re-order this to give
better flow:

  error: unable to access 'http://example.com/repo.git: The requested URL reported failure: 403 Forbidden

This is still annoyingly long, but at least reads more
clearly left to right.
Signed-off-by: NJeff King <peff@peff.net>
Signed-off-by: NJunio C Hamano <gitster@pobox.com>
上级 67d2a7b5
......@@ -943,7 +943,7 @@ static int http_get_file(const char *url, const char *filename, int options)
void http_error(const char *url)
{
error("%s while accessing %s", curl_errorstr, url);
error("unable to access '%s': %s", url, curl_errorstr);
}
int http_fetch_ref(const char *base, struct ref *ref)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册