Subject: bug#42501: feature request: exclude-vcs option

From: Collin Funk <[email-masked]>
Date: Sat, 06 Jul 2024 13:20:28 -0700

Hi Paul,

Paul Eggert <[email-masked]> writes:

> Yes, it's a bit of a puzzle. But for Git shouldn't we exclude only
> .git, and not .gitignore, .gitattributes, and .gitmodules? Normally
> these files are under Git control so "git grep" will search them, so
> shouldn't grep --exclude-vcs also search them? Similarly for
> .cvsignore, .hgignore, .hgtags.

I was basing it off the behavior of GNU tar. Doesn't --exclude-vcs there
ignore .gitignore, etc?

Note that the output of --help would make it seems otherwise. But when
tar'ing a local git clone I don't have a .gitignore in it.

$ tar --help | grep 'exclude-vcs'
      --exclude-vcs          exclude version control system directories
      --exclude-vcs-ignores  read exclude patterns from the VCS ignore files

Collin