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

[PATCH 5/9] builtin-init-db: use warning() instead of fprintf(stderr, "warning: ")

From
Miklos Vajna <vmiklos@frugalware.org>
Date
Mar 24, 2009, 01:09 UTC
Message-ID
<6ca31ce7256d8945f520b7d57e2a14b890731abd.1237856682.git.vmiklos@frugalware.org>
In-Reply-To
<d499d514cd704edfc54ad62422e77aca275c9527.1237856682.git.vmiklos@frugalware.org>
---
 builtin-init-db.c |    7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/builtin-init-db.c b/builtin-init-db.c
index ee3911f..fc63d0f 100644
--- a/builtin-init-db.c
+++ b/builtin-init-db.c
@@ -130,8 +130,7 @@ static void copy_templates(const char *template_dir)
 	}
 	dir = opendir(template_path);
 	if (!dir) {
-		fprintf(stderr, "warning: templates not found %s\n",
-			template_dir);
+		warning("templates not found %s", template_dir);
 		return;
 	}
 
@@ -144,8 +143,8 @@ static void copy_templates(const char *template_dir)
 
 	if (repository_format_version &&
 	    repository_format_version != GIT_REPO_VERSION) {
-		fprintf(stderr, "warning: not copying templates of "
-			"a wrong format version %d from '%s'\n",
+		warning("not copying templates of "
+			"a wrong format version %d from '%s'",
 			repository_format_version,
 			template_dir);
 		closedir(dir);
-- 
1.6.2
Previous: Miklos VajnaNext: Miklos Vajna
Message 6 of 16 in “fprintf(stderr, "warning: ") -> warning() patches”
  1. 0/9 fprintf(stderr, "warning: ") -> warning() patchesMiklos Vajna, Mar 24, 2009
  2. 1/9 http-push: using error() and warning() as appropriateMiklos Vajna, Mar 24, 2009
  3. 2/9 builtin-apply: use warning() instead of fprintf(stderr, "warning: ")Miklos Vajna, Mar 24, 2009
  4. 3/9 builtin-checkout: use warning() instead of fprintf(stderr, "warning: ")Miklos Vajna, Mar 24, 2009
  5. 4/9 builtin-fetch-pack: use warning() instead of fprintf(stderr, "warning: ")Miklos Vajna, Mar 24, 2009
  6. 5/9 builtin-init-db: use warning() instead of fprintf(stderr, "warning: ")Miklos Vajna, Mar 24, 2009
  7. 6/9 builtin-rm: use warning() instead of fprintf(stderr, "warning: ")Miklos Vajna, Mar 24, 2009
  8. 7/9 builtin-show-branch: use warning() instead of fprintf(stderr, "warning: ")Miklos Vajna, Mar 24, 2009
  9. 8/9 builtin-show-ref: use warning() instead of fprintf(stderr, "warning: ")Miklos Vajna, Mar 24, 2009
  10. 9/9 refs: use warning() instead of fprintf(stderr, "warning: ")Miklos Vajna, Mar 24, 2009
  11. Erik Faye-LundMar 24, 2009
  12. Miklos VajnaMar 24, 2009
  13. Erik Faye-LundMar 24, 2009
  14. Erik Faye-LundMar 24, 2009
  15. Jeff KingMar 24, 2009
  16. Junio C HamanoMar 24, 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.