commit - c18886c6f84198611809d07f56e3ae6f97f58f50
commit + 3f148bc66e13559704e12d07a8c05612be797de2
blob - 2acdc3d5fd539be05d49be7c7c03e3e13cdf01ce
blob + fd98027aca25f70b7500f2f6e60ae73cc02d6033
--- lib/worktree.c
+++ lib/worktree.c
ie->size == (sb->st_size & 0xffffffff));
}
+/* Report file status and initialize sb->st_mode. */
static const struct got_error *
get_file_status(unsigned char *status, struct stat *sb,
struct got_fileindex_entry *ie, const char *abspath,
return got_error_from_errno2("open", abspath);
}
- if (ie == NULL)
+ if (ie == NULL) {
+ sb->st_mode = GOT_DEFAULT_FILE_MODE;
goto done;
+ }
if (fstat(fd, sb) == -1) {
err = got_error_from_errno2("fstat", abspath);