Comments (4)
ok - time to write some tests ;-)
I also believe that at the moment .gitignore files in the symlinked folder ( or symlinked .gitignore files) would not be handeled correctly.
So a full blown test matrix is needed ...
from igittigitt.
Thanks, that's very kind that you are willing to look into this. Let me know if you need any help with this.
from igittigitt.
I am encountering this issue as well but have a slightly different use case to the one described.
For my Python projects, I use poetry to manage virtual environments. I have virtualenvs.in-project=true
set in my poetry.toml
file. This results in the Python virtual environment being created in $PROJECT_DIR/.venv
. In my $PROJECT_DIR/.gitignore
file, I have a line containing .venv
which causes git to ignore the contents of the directory.
When adding rules to igittigitt.IgnoreParser
via .parse_rule_files()
, I am passing $PROJECT_DIR
as my base directory. Using pathlib.path.rglob("*")
, I am recursively iterating over the context of my project directory and all it's subdirectories - passing each yielded object into .match()
to ensure that it does not match before returning the object.
The results of this looks as I would expect except it contains 3 files within the $PROJECT_DIR/.venv
directory: $PROJECT_DIR/.venv/bin/python3.9
, $PROJECT_DIR/.venv/bin/python3
, and $PROJECT_DIR/.venv/bin/python
. All three of these files are symlinks to the Python executables on my system. They are created by virtualenv
when the Python virtual environment is created so the existence of these files is unavoidable.
My current workaround is to add an additional rule (.add_rule("**/bin/python*", "/")
). This is fine on my system while the integration of this library is under development but it's not something I want to rely on in the final release.
If no one else has time to look into fixing this, I'll circle back to see what I can work out.
from igittigitt.
ok, I will look into it - but will take some time....
from igittigitt.
Related Issues (9)
- not parsing subdirs of ignored directories HOT 3
- Use glob.glob instead of Pathlib.glob to follow symlink HOT 4
- issue with negates pattern HOT 3
- CLI to query local directory HOT 1
- Default ignore file in home directory HOT 2
- 'IgnoreParser' object has no attribute 'parse_rule_file'
- Doesn't correctly handle base directories with a symlink in their components HOT 5
- Match ignore file with different base paths? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from igittigitt.