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

[PATCH] print unlink(2) errno in copy_or_link_directory

From
Alex Riesen <raa.lkml@gmail.com>
Date
Apr 29, 2009, 21:24 UTC
Message-ID
<20090429212452.GA12981@blimp.localdomain>
Signed-off-by: Alex Riesen <raa.lkml@gmail.com>
---
 builtin-clone.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/builtin-clone.c b/builtin-clone.c
index 880373f..ba286e0 100644
--- a/builtin-clone.c
+++ b/builtin-clone.c
@@ -228,7 +228,8 @@ static void copy_or_link_directory(struct strbuf *src, struct strbuf *dest)
 		}
 
 		if (unlink(dest->buf) && errno != ENOENT)
-			die("failed to unlink %s", dest->buf);
+			die("failed to unlink %s: %s",
+			    dest->buf, strerror(errno));
 		if (!option_no_hardlinks) {
 			if (!link(src->buf, dest->buf))
 				continue;
-- 
1.6.3.rc3.39.g49fd5
Message 1 of 1 in “print unlink(2) errno in copy_or_link_directory”
  1. print unlink(2) errno in copy_or_link_directoryAlex Riesen, Apr 29, 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.