-
Notifications
You must be signed in to change notification settings - Fork 20
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
Gitignore works differently on different machines #52
Comments
This choice was made because git supports this:
-- The alternative design choice is to ignore the user ignores and require all possible tool files to be added to project .gitignores, leading to similar source repro issues when user-specific rules are missing from projects. The README mentions:
You're right that the choice is a tradeoff, so I'm open to making this behavior configurable here. It's worth a comparison. |
Thanks for the info!
I'd be happy to test it out! Even if it's non-default behaviour.. |
You could make it conditional here Line 109 in 2119074
and add parameters all the way up. I'd like the 'public' interface gitignoreSource and gitignoreFilter to be backcompatible. You could introduce *With functions; e.g.gitignoreSourceWith { enableUserRules = false; } ./.
|
@roberth I have a fork here now, but I haven't had the chance to try it out: |
My 2 cents as someone who just wasted a few hours on this: I think the difference is how files which are both tracked by git and listed in a gitignore are handled. Once added (possibly using So, without having looked into this project a whole deal, I'd humbly suggest that files which are tracked by git should always be considered, regardless of them being matched by any ignore files. When I'm running a command like
I am most definitely not expecting my local git configuration to result in missing files during the checkout. I thought the package was broken and reported NorfairKing/smos#237. The error was very hard to diagnose, I eventually found it by |
@voidus Congrats on the digging! |
I've updated the comparison. I'm becoming increasingly convinced that gitignores are a fight that can't be won. If you really care, you'll want to use explicit inclusion rules, rather than implicit exclusion rules. Explicit inclusion rules can be created with |
I've run into (another) unreproducible issue because gitignore.nix reads global ignore files:
NorfairKing/smos#226 (comment)
I've not formed any opinion on this choice yet, but I would like to learn about the tradeoff so that I may make my builds reproducible again. Where can I learn about this?
The text was updated successfully, but these errors were encountered: