@matheusbsbs / matheus-bagliano / commits / 304dcf262e
Fork 0

Report symlink failures in merge-recursive

Signed-off-by: Alex Riesen <raa.lkml@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Alex Riesen committed Dec 5, 2008 at 01:39 UTC 304dcf262e3f8524c909a13cf73a67522be6353b
1 file changed +2 -1
merge-recursive.c
+2 -1
@@ -525,7 +525,8 @@ static void update_file_flags(struct merge_options *o,
525 char *lnk = xmemdupz(buf, size);
526 safe_create_leading_directories_const(path);
527 unlink(path);
528 - symlink(lnk, path);
528 + if (symlink(lnk, path))
529 + die("failed to symlink %s: %s", path, strerror(errno));
530 free(lnk);
531 } else
532 die("do not know what to do with %06o %s '%s'",