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

[PATCH 5/6] Change output "error: " to "Error: " etc

From
John Tapsell <johnflux@gmail.com>
Date
Feb 19, 2009, 07:36 UTC
Message-ID
<200902190736.49161.johnflux@gmail.com>

All the error messages starting "Error: " begin with a captial E, except in one place. This commit fixes this, making the output look more consistent. At the moment a failed push, say, looks like:

Error: cannot lock existing info/refs
error: failed to push some refs to 'some repository'
Signed-off-by: John Tapsell <johnflux@gmail.com>
---
 usage.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/usage.c b/usage.c
index 24f5fc0..acc4ee1 100644
--- a/usage.c
+++ b/usage.c
@@ -14,24 +14,24 @@ static void report(const char *prefix, const char *err, va_list params)
 
 static NORETURN void usage_builtin(const char *err)
 {
-	fprintf(stderr, "usage: %s\n", err);
+	fprintf(stderr, "Usage: %s\n", err);
 	exit(129);
 }
 
 static NORETURN void die_builtin(const char *err, va_list params)
 {
-	report("fatal: ", err, params);
+	report("Fatal: ", err, params);
 	exit(128);
 }
 
 static void error_builtin(const char *err, va_list params)
 {
-	report("error: ", err, params);
+	report("Error: ", err, params);
 }
 
 static void warn_builtin(const char *warn, va_list params)
 {
-	report("warning: ", warn, params);
+	report("Warning: ", warn, params);
 }
 
 /* If we are in a dlopen()ed .so write to a global variable would segfault
-- 
1.6.2.rc1.3.g7d31b.dirty
Next: Thomas Rast
Message 1 of 19 in “Change output "error: " to "Error: " etc”
  1. 5/6 Change output "error: " to "Error: " etcJohn Tapsell, Feb 19, 2009
  2. Thomas RastFeb 19, 2009
  3. Jeff KingFeb 19, 2009
  4. http-push: using error() and warning() as appropriateMiklos Vajna, Feb 19, 2009
  5. Jeff KingFeb 19, 2009
  6. 0/8 fprintf(stderr, "warning: ") -> warning() patchesMiklos Vajna, Feb 19, 2009
  7. 1/8 builtin-apply: use warning() instead of fprintf(stderr, "warning: ")Miklos Vajna, Feb 19, 2009
  8. Jeff KingFeb 20, 2009
  9. Junio C HamanoFeb 20, 2009
  10. Miklos VajnaMar 22, 2009
  11. Junio C HamanoMar 22, 2009
  12. Miklos VajnaFeb 20, 2009
  13. 2/8 builtin-checkout: use warning() instead of fprintf(stderr, "warning: ")Miklos Vajna, Feb 19, 2009
  14. 3/8 builtin-fetch-pack: use warning() instead of fprintf(stderr, "warning: ")Miklos Vajna, Feb 19, 2009
  15. 4/8 builtin-init-db: use warning() instead of fprintf(stderr, "warning: ")Miklos Vajna, Feb 19, 2009
  16. 5/8 builtin-rm: use warning() instead of fprintf(stderr, "warning: ")Miklos Vajna, Feb 19, 2009
  17. 6/8 builtin-show-branch: use warning() instead of fprintf(stderr, "warning: ")Miklos Vajna, Feb 19, 2009
  18. 7/8 builtin-show-ref: use warning() instead of fprintf(stderr, "warning: ")Miklos Vajna, Feb 19, 2009
  19. 8/8 refs: use warning() instead of fprintf(stderr, "warning: ")Miklos Vajna, Feb 19, 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.