commit 7fa0d182b13fc09edbb6d78f68a0db455a61d0f5 from: Stefan Sperling date: Sat Aug 03 14:36:22 2019 UTC don't forget to initialize st_mode in revert_file() commit - de426ea6e11d30934ad252a54e6cfad88f3ed054 commit + 7fa0d182b13fc09edbb6d78f68a0db455a61d0f5 blob - 7587a67bcb84b959f069cf0d6ae845bf571ed972 blob + a64b0f8a733115f6aa705ad8e394e407b54590f8 --- lib/worktree.c +++ lib/worktree.c @@ -2654,6 +2654,8 @@ revert_file(struct got_worktree *worktree, struct got_ err = get_file_status(&status, &sb, ie, ondisk_path, repo); if (err) goto done; + if (status == GOT_STATUS_MISSING || status == GOT_STATUS_DELETE) + sb.st_mode = got_fileindex_perms_to_st(ie); err = got_object_id_by_path(&tree_id, repo, worktree->base_commit_id, tree_path);