Skip to content

Commit 39a570f

Browse files
peffgitster
authored andcommitted
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: Jeff King <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 67d2a7b commit 39a570f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

http.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -943,7 +943,7 @@ static int http_get_file(const char *url, const char *filename, int options)
943943

944944
void http_error(const char *url)
945945
{
946-
error("%s while accessing %s", curl_errorstr, url);
946+
error("unable to access '%s': %s", url, curl_errorstr);
947947
}
948948

949949
int http_fetch_ref(const char *base, struct ref *ref)

0 commit comments

Comments
 (0)