cspell icon indicating copy to clipboard operation
cspell copied to clipboard

The `useGitIgnore` setting should also consider `.git/info/exclude

Open andrewnicols opened this issue 3 years ago • 2 comments

Is your feature request related to a problem? Please describe. I can use a .git/info/exclude file to exclude files from git on a per-checkout basis, but these are not ignored by cspell without modifying a checked-in file.

Describe the solution you'd like The useGitIgnore configuration setting should also consider the .git/info/exclude file, in addition to .gitignore.

Describe alternatives you've considered Write configuration as a cspell.config.js file and read in the .git/info/exclude file to add values to the ignorelist dynamically.

Additional context This feature of git is documented at https://git-scm.com/docs/gitignore#_description

There are several variants:

  • .gitignore
  • .git/info/exclude
  • Patterns read from the file specified by the configuration variable core.excludesFile.

andrewnicols avatar Apr 12 '22 14:04 andrewnicols

@andrewnicols,

Thank you.

Jason3S avatar May 09 '22 10:05 Jason3S

If $XDG_CONFIG_HOME is either not set or empty, $HOME/.config/git/ignore should also be considered a variant, as per the documentation.

datafoo avatar Jan 10 '23 12:01 datafoo