Code

Merge branch 'ar/unlink-err'
[git.git] / builtin-clone.c
index d068b7e0d89399ac54c2cf56f128d8884e20b665..c935833c6ce176caf47a14b5ad1f2848f0d1ab22 100644 (file)
@@ -252,7 +252,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;