Skip to content

Commit f6a5f1b

Browse files
raalkmlgitster
authored andcommitted
print unlink(2) errno in copy_or_link_directory
Signed-off-by: Alex Riesen <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 691f1a2 commit f6a5f1b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

builtin-clone.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,8 @@ static void copy_or_link_directory(struct strbuf *src, struct strbuf *dest)
228228
}
229229

230230
if (unlink(dest->buf) && errno != ENOENT)
231-
die("failed to unlink %s", dest->buf);
231+
die("failed to unlink %s: %s",
232+
dest->buf, strerror(errno));
232233
if (!option_no_hardlinks) {
233234
if (!link(src->buf, dest->buf))
234235
continue;

0 commit comments

Comments
 (0)