Re:A simple, fast and user-friendly alternative to ‘find’
by jonnycomputer on Friday May 20, 2022 @12:47PM
(#31449867)
Why would the tool want to ignore patterns in a .gitignore? It isn't a git tool...
[ Parent
| on HN ]
Re:A simple, fast and user-friendly alternative to ‘find’
by joemi on Friday May 20, 2022 @01:51PM
(#31450556)
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.
Re:A simple, fast and user-friendly alternative to ‘find’
by neura on Monday May 23, 2022 @11:56AM
(#31480653)
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. :)
Re:A simple, fast and user-friendly alternative to ‘find’
by sfink on Friday May 20, 2022 @01:42PM
(#31450472)
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.
Re:A simple, fast and user-friendly alternative to ‘find’
by jonnycomputer on Friday May 20, 2022 @02:04PM
(#31450687)
I'm not asking why someone would find it be useful.
Re:A simple, fast and user-friendly alternative to ‘find’
by qot on Friday May 20, 2022 @06:51PM
(#31453534)
Yes you are. We are talking about a tool, so you are asking why someone would "find it be useful".
Re:A simple, fast and user-friendly alternative to ‘find’
by sfink on Friday May 20, 2022 @02:13PM
(#31450756)
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
Re:A simple, fast and user-friendly alternative to ‘find’
by jonnycomputer on Friday May 20, 2022 @02:34PM
(#31450963)
Again, I'm not asking why someone would find it useful.
Re:A simple, fast and user-friendly alternative to ‘find’
by sodality2 on Friday May 20, 2022 @02:50PM
(#31451138)
> Why would the tool want to ignore patterns in a .gitignore?
> The tool would want to use .gitignore files because it's useful.
Re:A simple, fast and user-friendly alternative to ‘find’
by jonnycomputer on Saturday May 21, 2022 @03:44PM
(#31461114)
Sometimes a question isn't a question.
Re:A simple, fast and user-friendly alternative to ‘find’
by neura on Monday May 23, 2022 @12:00PM
(#31480719)
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.
Re:A simple, fast and user-friendly alternative to ‘find’
by EdSchouten on Friday May 20, 2022 @04:47PM
(#31452314)
Exactly. And if you wanted a Git aware tool, you could just run 'git ls-files'.