Skip to content

Add -L to follow symbolic links - #67

Open
Boulea7 wants to merge 1 commit into
sharkdp:masterfrom
Boulea7:feature/dereference-symlinks
Open

Boulea7 wants to merge 1 commit into
sharkdp:masterfrom
Boulea7:feature/dereference-symlinks

Conversation

@Boulea7

@Boulea7 Boulea7 commented Nov 30, 2026

Copy link
Copy Markdown

Add diskus -L / --dereference for package trees that use symbolic links. Follow the links and visit each resolved target once, so directory cycles terminate. Library callers can use DiskUsage::dereference(true).

Fixes #44.

Validation

  • Default and library-only tests pass on macOS.
  • Both flag forms were checked against real symlinks, hard links, directory cycles, duplicate aliases, and broken links.
  • Windows GNU passed cargo check --all-targets --all-features.

AI assistance: OpenAI Codex.

Make dereferencing an opt-in traversal mode, and visit resolved entries
once so symbolic links to ancestor directories terminate. Expose the
mode through the CLI and the DiskUsage builder.

Refs sharkdp#44.
AI assistance: OpenAI Codex.
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.

Add an option to follow symlinks

1 participant