Skip to content

Skip already excluded directories#97

Open
VladRassokhin wants to merge 3 commits intostevegrunwell:developfrom
VladRassokhin:skip-excluded
Open

Skip already excluded directories#97
VladRassokhin wants to merge 3 commits intostevegrunwell:developfrom
VladRassokhin:skip-excluded

Conversation

@VladRassokhin
Copy link
Copy Markdown

@VladRassokhin VladRassokhin commented Oct 23, 2024

I've a ~/development/project directory which is manually marked as excluded from Time Machine.
Previously asimov would iterate over its subdirectories, now it won't.

Also, subsequent runs could benefit from that feature.

Using mdfind instead of find "${ASIMOV_ROOT}" -type d -xattrname "com.apple.metadata:com_apple_backup_excludeItem" -prune -print as it's superfast. Though it has a downside: some excluded directories are not reported.

Using `mdfind` since it's fast, yet it may not return all excluded directories

Kinda fixes stevegrunwell#68
django23 added a commit to django23/asimov that referenced this pull request Feb 19, 2026
Use Spotlight metadata (mdfind) to identify directories already excluded
from Time Machine and skip them during the find traversal. Also fixes a
comment typo and removes duplicate Gradle sentinel entries.

Inspired by stevegrunwell#97, props @VladRassokhin.
django23 added a commit to django23/asimov that referenced this pull request Feb 19, 2026
Use Spotlight metadata (mdfind) to identify directories already excluded
from Time Machine and skip them during the find traversal. Also fixes a
comment typo and removes duplicate Gradle sentinel entries.

Inspired by stevegrunwell#97, props @VladRassokhin.
django23 added a commit to django23/asimov that referenced this pull request Feb 19, 2026
* docs(readme): clarify that asimov only affects Time Machine, not Spotlight

Add a note explaining that asimov does not hide directories from
Spotlight indexing, with guidance on how to configure Spotlight privacy
settings separately.

Addresses stevegrunwell#90.

* feat(sentinels): add .NET project build directory exclusions

Exclude bin/ and obj/ directories when *.csproj (C#) or *.fsproj (F#)
project files are present, using glob sentinel patterns.

Inspired by stevegrunwell#87, props @guigomesa.

* feat: skip already-excluded directories for faster subsequent runs

Use Spotlight metadata (mdfind) to identify directories already excluded
from Time Machine and skip them during the find traversal. Also fixes a
comment typo and removes duplicate Gradle sentinel entries.

Inspired by stevegrunwell#97, props @VladRassokhin.

* feat: exclude well-known global cache directories

Add fixed directory exclusions for common tool caches (~/.cache,
~/.gradle/caches, ~/.m2/repository, ~/.npm/_cacache, ~/.nuget/packages,
~/.kube/cache) that are always safe to exclude without sentinel files.

Inspired by stevegrunwell#69, props @pkuczynski.
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