Thread (1 message) 1 message, 1 author, 2016-06-15

Re: [RFC/PATCH git] http: avoid empty error messages for some curl errors

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:51:59

Jonathan Nieder [off-list ref] writes:
When asked to fetch over SSL without a valid
/etc/ssl/certs/ca-certificates.crt file, "git fetch" writes

	error:  while accessing https://github.com/torvalds/linux.git/info/refs

which is a little disconcerting.  Better to fall back to
curl_easy_strerror(result) when the error string is empty, like the
curl utility does:

	error: Problem with the SSL CA cert (path? access rights?) while
	accessing https://github.com/torvalds/linux.git/info/refs

Signed-off-by: Jonathan Nieder <redacted>
---
Hi,

I ran into this error today because this machine has no certs enabled.
I'm not thrilled with the following patch because the error string
buffer is not cleared very often so it seems possible for it to be
not empty but stale at the relevant moment.  I would be happier if we
could rely on libcurl always filling the error buffer on errors.
Will queue both patches; thanks.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help