thoughtbot / dotfiles

A set of vim, zsh, git, and tmux configuration files.
https://thoughtbot.com
Other
7.99k stars 1.86k forks source link

Don't gitignore tags/ directories #677

Closed seanpdoyle closed 4 years ago

seanpdoyle commented 4 years ago

For example, the rails/rails project has an entire directory of classes with tags in the name, which hides it from search tools (like ag The Silver Searcher) and prevents committing changes or introducing new files.

Support for ignoring files named tags, but including directories named tags/ was originally introduced in a99fbb0, but was subsequently broken when the [negative !tags/ pattern declaration][] was moved above the tags line that it negated.

Instead of fighting the ignore patterns, this commit removes both lines. We currently ignore the contents of the .git/ directory, which is where we store the tags file generated in our git_template/hooks/ctags command, so we should be covered without explicit declarations.

seanpdoyle commented 4 years ago

@tabfugnic since you authored https://github.com/thoughtbot/dotfiles/commit/a99fbb0f575c671fb7f481961de05e604c0b1fde, could you test out my assumption that .git/tags is still ignored without these lines?

seanpdoyle commented 4 years ago

@geoffharcourt I've pushed up https://github.com/thoughtbot/dotfiles/pull/677/commits/42c728ffe473819082ed61ea34255b12d1487ae2, and it seems to work for me.

geoffharcourt commented 4 years ago

Wooot! @seanpdoyle If that turns out to be problematic, I don't think it's worth spending any further time here and falling back to your first commit seems like a fair tradeoff.