Skip to content

dehydrate: default to per-folder dehydration, add --full flag#1910

Open
tyrielv wants to merge 1 commit intomicrosoft:masterfrom
tyrielv:tyrielv/dehydrate-wildcard-folders
Open

dehydrate: default to per-folder dehydration, add --full flag#1910
tyrielv wants to merge 1 commit intomicrosoft:masterfrom
tyrielv:tyrielv/dehydrate-wildcard-folders

Conversation

@tyrielv
Copy link
Contributor

@tyrielv tyrielv commented Mar 4, 2026

Change the default 'gvfs dehydrate' behavior from full-enlistment dehydration (unmount, backup entire src, recreate virtualization root) to per-folder dehydration of all root-level folders. This is faster and does not require a full unmount/remount cycle.

The previous full-enlistment behavior is preserved via the new --full flag for cases where a complete reset is needed.

Changes:

  • Add --full option for legacy full-enlistment dehydrate
  • When neither --folders nor --full is specified, enumerate all root-level directories from HEAD via 'git ls-tree' and dehydrate them individually
  • Using the git tree (not filesystem) ensures deleted folders are restored by the dehydrate
  • Reject combining --full with --folders
  • Update confirmation messages to reflect new defaults
  • Update functional tests: existing full-dehydrate tests now pass --full, add new FullDehydrate* tests, default-path test exercises the new all-root-folders behavior

Performance (2.8M file repo, 1000 dirs hydrated, ~5,600 files):
Root-folders (default): 13.0s
Full (--full): 51.1s

Change the default 'gvfs dehydrate' behavior from full-enlistment
dehydration (unmount, backup entire src, recreate virtualization root)
to per-folder dehydration of all root-level folders. This is faster
and does not require a full unmount/remount cycle.

The previous full-enlistment behavior is preserved via the new --full
flag for cases where a complete reset is needed.

Changes:
- Add --full option for legacy full-enlistment dehydrate
- When neither --folders nor --full is specified, enumerate all
  root-level directories from HEAD via 'git ls-tree' and dehydrate
  them individually
- Using the git tree (not filesystem) ensures deleted folders are
  restored by the dehydrate
- Reject combining --full with --folders
- Update confirmation messages to reflect new defaults
- Update functional tests: existing full-dehydrate tests now pass
  --full, add new FullDehydrate* tests, default-path test exercises
  the new all-root-folders behavior

Performance (2.8M file repo, 1000 dirs hydrated, ~5,600 files):
  Root-folders (default): 13.0s
  Full (--full):          51.1s

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant