Skip to content

Follow-ups from the #242 (exec bit) review: special bits, protected-file tests, resolve-after-delete mode #243

Closed

Description

@tonibergholm-codento

Non-blocking items from the independent review of #242.

  1. worktree::write_file: mask setuid/setgid/sticky (want &= !0o7000) like git, which recreates files and never carries them over (an existing 02644 file becomes 02755 after EXEC for a non-root user). Low severity.
  2. Add one protected-file test with an identity: decrypted protected plaintext (worktree.rs ~953), materialize_private (private.rs ~407/425), the private-merge conflict write-out (~1338-1342) and the protected conflict write-out (repo.rs ~1984) all use the shared helper but are untested.
  3. sc resolve after the user deletes a conflicted file rewrites it without the execute bit (conflicts.rs ~250).
  4. vfs::Worktree::checkout sets the mode outright (ignores umask, does not tolerate Unsupported); align with write_file.
  5. Optional one-time warning when a chmod is swallowed (PermissionDenied/Unsupported), since status ignores modes and the next commit silently records EXEC as FILE.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions