4 ms·
Why would the tool want to ignore patterns in a .gitignore? It isn't a git tool...
by jonnycomputer 4y ago
Why would the tool want to ignore patterns in a .gitignore? It isn't a git tool...
- sfink 4y agoGenerated files. If you're searching for every place something shows up so you can change it, it's annoying to have to filter out the stuff that'll get updated automatically (and will mess up timestamps if you update manually.) Also, backup files. The fewer irrelevant results, the more useful a tool is.
- jonnycomputer 4y agoI'm not asking why someone would find it be useful.
- sfink 4y agoThe tool would want to use .gitignore files because it's useful. Also, it's far from the only non-VCS tool that uses VCS ignore files. rsync --cvs-exclude tar --exclude-vcs
- jonnycomputer 4y agoAgain, I'm not asking why someone would find it useful.
- sodality2 4y ago> Why would the tool want to ignore patterns in a .gitignore? > The tool would want to use .gitignore files because it's useful.
- jonnycomputer 4y agoSometimes a question isn't a question.
- qot 4y agoYes you are. We are talking about a tool, so you are asking why someone would "find it be useful".
- joemi 4y agoI don't like it when non-git tools do that by default. I'm sure it's nice for some people, so make it an option that could be enabled. But to have that behavior by default feels far too opinionated for me.
- neura 4y agoPeople generally develop tools for their own needs. I'm not saying "hey, if you want one that uses the defaults you believe are best, create your own", but just keep some empathy for open source developers. :)
- EdSchouten 4y agoExactly. And if you wanted a Git aware tool, you could just run 'git ls-files'.
- neura 4y agoTo answer your question directly: If you're grepping through source code, you generally do not care about caches, backups, personal workspace configs, node_modules, "compiled" output (JS projects generally "compile" to JS and if you're looking for something in source files, you probably do not care about the bundles you're outputting, just the source), etc. You generally care about your source code, which is the stuff that's not getting added to .gitignore. Since we're talking about an open source project, try to keep some empathy for developers that are solving their own problems first and not trying to solve everybody's problems. It's a configurable option, anyway.