Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix #431 - directory not ignored with negative pattern #432

Merged
merged 19 commits into from
Feb 18, 2024
Merged

Conversation

deadc0de6
Copy link
Owner

@deadc0de6 deadc0de6 commented Jan 26, 2024

fix #431

The issue lies in the fact we do not ignore directories when there is any negative ignore pattern defined. This is to force the caller to enter the directory and evaluate any potential negative ignore pattern inside it.

See https://github.com/deadc0de6/dotdrop/blob/master/dotdrop/utils.py#L307

  • discard empty directory
  • static instead of recursive search (construct diff from static tree of both sides and then compare)
  • see if the same applies to the other commands
    • compare
    • install
    • update
    • import
    • uninstall

Copy link

codecov bot commented Jan 28, 2024

Codecov Report

Attention: 20 lines in your changes are missing coverage. Please review.

Comparison is base (de05935) 89.81% compared to head (31e466e) 91.02%.

Files Patch % Lines
dotdrop/updater.py 78.84% 11 Missing ⚠️
dotdrop/importer.py 87.23% 6 Missing ⚠️
dotdrop/comparator.py 94.28% 2 Missing ⚠️
dotdrop/dotdrop.py 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #432      +/-   ##
==========================================
+ Coverage   89.81%   91.02%   +1.20%     
==========================================
  Files          21       22       +1     
  Lines        4791     4746      -45     
==========================================
+ Hits         4303     4320      +17     
+ Misses        488      426      -62     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@deadc0de6
Copy link
Owner Author

install and uninstall won't use the new ftree since those are handling a lot more than just copying/removing files (backups, transformations, etc).

@deadc0de6 deadc0de6 merged commit 5df2e1e into master Feb 18, 2024
13 checks passed
@deadc0de6 deadc0de6 deleted the fix-431 branch February 10, 2025 13:13
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.

[bug] Directory ignore pattern not working in cmpignore
1 participant