Const
The production ReadWorktreeEntry: lstat, then readlink for a link, an O_NOFOLLOW read for a regular file, and nothing for any other kind. Each guards the final component only.
lstat
readlink
The production ReadWorktreeEntry:
lstat, thenreadlinkfor a link, an O_NOFOLLOW read for a regular file, and nothing for any other kind. Each guards the final component only.