xo icon indicating copy to clipboard operation
xo copied to clipboard

Add support for checking `core.excludesfile` for ignore defaults

Open LitoMore opened this issue 6 months ago • 4 comments

How about adding support for checking the git config core.excludesfile for ignore defaults?

LitoMore avatar May 29 '25 16:05 LitoMore

Does this not already happen? Just earlier I saw errors in my distribution folder and I fixed them just by adding distribution to my .gitignore

fregante avatar Jun 29 '25 15:06 fregante

Does this not already happen? Just earlier I saw errors in my distribution folder and I fixed them just by adding distribution to my .gitignore.

That's why I submitted this issue.

LitoMore avatar Jun 29 '25 15:06 LitoMore

Best to link to what excludesfile is:

https://git-scm.com/docs/gitignore#_configuration

fregante avatar Jun 29 '25 16:06 fregante

Should I add the global .gitignore support to the globby? Or just in XO?

Reading core.excludesfile from the git config may need a shell execution. However, it appears that globby does not yet have any child-process-related code.

@fregante @sindresorhus Could you give some suggestions about where we should implement this feature?

LitoMore avatar Jun 29 '25 16:06 LitoMore