You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Make set_executable_after_creation everywhere bool
In `finalize_entry` and its callers, `set_executable_after_creation`
was previously an `Option<&Path>`, because `chmod` was called (via
a higher level abstraction) on the path to make the file executable.
From #1764, `lstat` (via a higher level abstraction) was likewise
called on the path to find out what its old mode was, to figure out
what mode to set to achieve +x.
Now that the `lstat` is replaced with `fstat`, and the `chmod` is
replaced with `fchmod`, figuring out how to set +x and setting it
are done entirely on the file descriptor, with the path unused. It
turns out that this was the only use of that path in that context.
Accordingly, this makes `set_executable_after_creation` a `bool`
in both `finalize_entry` and its callers, and removes code that was
only used for handling that path.
This includes eliminating the `rela_path_as_path` variable in
`checkout::chunk::process_delayed_filter_results`, which was
apparently only used for this purpose. (All writes and reads on it
were for preparing and passing a path to `finalize_entry`. The
`finalize_entry` function had only used it to set the file
executable, and had documented that this was its purpose.)
0 commit comments