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

[PATCH] http: remove extra newline in error message

From
Jonathan Nieder <jrnieder@gmail.com>
Date
Sep 5, 2011, 22:29 UTC
Message-ID
<20110905222934.GA20084@elie>
In-Reply-To
<20110905222202.GA32071@elie>

There is no need for a blank line between the detailed error message and the later "fatal: HTTP request failed" notice. Keep the newline written by error() itself and eliminate the extra one.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
---
> I ran into this error today
Here's a patch for a simpler buglet noticed at the same time.
 http.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/http.c b/http.c
index dec3c60a..fb3465f5 100644
--- a/http.c
+++ b/http.c
@@ -913,7 +913,7 @@ int http_error(const char *url, int ret)
 {
 	/* http_request has already handled HTTP_START_FAILED. */
 	if (ret != HTTP_START_FAILED)
-		error("%s while accessing %s\n", curl_errorstr, url);
+		error("%s while accessing %s", curl_errorstr, url);
 
 	return ret;
 }
-- 
1.7.6
Previous: Jonathan NiederNext: Daniel Stenberg
Message 2 of 6 in “http: avoid empty error messages for some curl errors”
  1. http: avoid empty error messages for some curl errorsJonathan Nieder, Sep 5, 2011
  2. http: remove extra newline in error messageJonathan Nieder, Sep 5, 2011
  3. Daniel StenbergSep 6, 2011
  4. Junio C HamanoSep 6, 2011
  5. Daniel StenbergSep 6, 2011
  6. Junio C HamanoSep 6, 2011

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.