Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Why would the tool want to ignore patterns in a .gitignore? It isn't a git tool...



I 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.


People 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. :)


Generated 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.


I'm not asking why someone would find it be useful.


Yes you are. We are talking about a tool, so you are asking why someone would "find it be useful".


The 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


Again, I'm not asking why someone would find it useful.


> Why would the tool want to ignore patterns in a .gitignore?

> The tool would want to use .gitignore files because it's useful.


Sometimes a question isn't a question.


To 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.


Exactly. And if you wanted a Git aware tool, you could just run 'git ls-files'.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: