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

[Squash PATCH] fprintf(stderr, "Warning...") -> warning("...")

From
ILIlari Liusvaara <ilari.liusvaara@elisanet.fi>
Date
Dec 24, 2009, 10:41 UTC
Message-ID
<1261651279-29041-1-git-send-email-ilari.liusvaara@elisanet.fi>
Signed-off-by: Ilari Liusvaara <ilari.liusvaara@elisanet.fi>
---
 transport-helper.c |    7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)

This fixes the small nit about fprintf(stderr, "Warning: ") by using warning() API.

It can be appiled on top of "Support remote helpers implementing smart transports" or squashed to it.

diff --git a/transport-helper.c b/transport-helper.c
index 55427df..8c8ca8e 100644
--- a/transport-helper.c
+++ b/transport-helper.c
@@ -420,11 +420,10 @@ static int process_connect_service(struct transport *transport,
 	if (strcmp(name, exec)) {
 		r = set_helper_option(transport, "servpath", exec);
 		if (r > 0)
-			fprintf(stderr, "Warning: Setting remote service path "
-				"not supported by protocol.\n");
+			warning("Setting remote service path not supported "
+				"by protocol.\n");
 		else if (r < 0)
-			fprintf(stderr, "Warning: Invalid remote service "
-				"path.\n");
+			warning("Invalid remote service path.\n");
 	}
 
 	if (data->connect)
-- 
1.6.6.3.gaa2e1
Next: Junio C Hamano
Message 1 of 2 in “fprintf(stderr, "Warning...") -> warning("...")”
  1. fprintf(stderr, "Warning...") -> warning("...")Ilari Liusvaara, Dec 24, 2009
  2. Junio C HamanoDec 28, 2009

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.