mirror of
https://github.com/bootandy/dust.git
synced 2026-06-08 11:29:05 +03:00
[PR #475] [MERGED] fix: Support absolute path with -X option
#502
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/bootandy/dust/pull/475
Author: @frendsick
Created: 3/7/2025
Status: ✅ Merged
Merged: 3/11/2025
Merged by: @bootandy
Base:
master← Head:feat/ignore-absolute-directory📝 Commits (5)
9b985d5fix: Ignoring absolute path with-Xoptiona163868perf: Do not canonicalize non-absolute ignored pathc5fcb96refactor: Extract is_ignored_path function4913639perf: Canonicalize ignored absolute path only once47f3b13rewrite: Reduce indentation with guard clause📊 Changes
3 files changed (+39 additions, -2 deletions)
View changed files
📝
src/dir_walker.rs(+26 -2)📝
src/main.rs(+2 -0)📝
src/utils.rs(+11 -0)📄 Description
Allow excluding any directory or file by absolute path using the
-Xoption.The proposed change for the
ignore_filefunction checks whether the file's absolute path representation starts with any of the absolute path representations of ignored directories. Any file inside an ignored folder should have a common path with the ignored directory.Fixes: #471
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.