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

[PATCH] clone: drop period from end of die_errno message

From
Jeff King <peff@peff.net>
Date
Mar 18, 2015, 19:02 UTC
Message-ID
<20150318190200.GC650@peff.net>
In-Reply-To
<20150318185531.GA650@peff.net>

We do not usually end our errors with a full stop, but it looks especially bad when you use die_errno, which adds a colon, like:

  fatal: could not create work tree dir 'foo'.: No such file or directory
Signed-off-by: Jeff King <peff@peff.net>
---
Not strictly related to the other patch, but I noticed it while playing
around.
 builtin/clone.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/builtin/clone.c b/builtin/clone.c
index 9572467..aa01437 100644
--- a/builtin/clone.c
+++ b/builtin/clone.c
@@ -848,7 +848,7 @@ int cmd_clone(int argc, const char **argv, const char *prefix)
 			die_errno(_("could not create leading directories of '%s'"),
 				  work_tree);
 		if (!dest_exists && mkdir(work_tree, 0777))
-			die_errno(_("could not create work tree dir '%s'."),
+			die_errno(_("could not create work tree dir '%s'"),
 				  work_tree);
 		set_git_work_tree(work_tree);
 	}
-- 
2.3.3.520.g3cfbb5d
Previous: Jeff King
Message 3 of 3 in “git clone doesn't cleanup on failure when getcwd fails”
  1. Spencer NelsonMar 18, 2015
  2. clone: initialize atexit cleanup handler earlierJeff King, Mar 18, 2015
  3. clone: drop period from end of die_errno messageJeff King, Mar 18, 2015

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.