Commit ddaf8a6
committed
Convert the mode more portably
The previous conversion worked on Linux but failed on macOS where
modes, as represented in system data structures, are 16-bit rather
than 32-bit.
The previous commit broke builds on macOS (and possibly other
OSes not currently tested on CI), which this should fix.
This commit also does some other refactorings:
- Simplify the way conversions are represented.
- Express with `expect` that, by this point, there are no unknown
bits, rather than doing something that would silently preserve or
silently discard them. There would have to be a bug (and probably
in `gix-worktree-state` itself) for that not to be the case.
- Clarify the TODO comment, and also weaken it since there might be
some reason for `set_mode_executable` to keep using `Permissions`
in some way.1 parent 0becc91 commit ddaf8a6
1 file changed
+5
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
287 | 287 | | |
288 | 288 | | |
289 | 289 | | |
290 | | - | |
291 | | - | |
292 | | - | |
293 | | - | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
294 | 295 | | |
295 | 296 | | |
296 | 297 | | |
| |||
0 commit comments