Uniquify automatic wrapper snapshot names

This commit is contained in:
mdaleo404 committed 2026-10-10 08:07:19 +01:00
1 parent 3d3e9dae13
commit a317582b72
4 files changed
+83 -5

No files matched your search

+3 -2
View File
@@ -316,7 +316,7 @@ The wrapper snapshot flow is:
wrapper_cmd
-> _extract_paths_from_command()
-> _common_snapshot_root()
-> create auto-YYYYMMDD-HHMMSS state
-> create a unique auto-YYYYMMDD-HHMMSS[-N] state
-> _iter_entries_for_target() for each path
-> insert each relative path once
-> run subprocess.run(wrapper_cmd)
@@ -798,7 +798,8 @@ The list of `PlannedChange` objects produced before any mutation occurs.
The `chguard -- chmod|chown|chgrp ...` mode that saves an automatic pre-command snapshot before running the command.
**Auto snapshot**
A wrapper-created state named like `auto-YYYYMMDD-HHMMSS`.
A wrapper-created state named like `auto-YYYYMMDD-HHMMSS`, with a numeric
suffix when needed to keep same-second snapshots unique.
**Owner restore**
Restoring numeric uid/gid with `os.chown(..., follow_symlinks=False)`.