Returns `true` if the project marker dir (`.tracedecay`) is ignored by Git for this project. This respects the repository `.gitignore`, `.git/info/exclude`, and the user's global excludes file via `git check-ignore`. If Git cannot answer (for example outside a Git repository), falls back to checking the local `.gitignore` file only.
(project_path: &Path)
| 501 | /// (for example outside a Git repository), falls back to checking the local |
| 502 | /// `.gitignore` file only. |
| 503 | pub fn is_in_gitignore(project_path: &Path) -> bool { |
| 504 | if let Some(is_ignored) = is_ignored_by_git(project_path, None) { |
| 505 | return is_ignored; |
| 506 | } |
| 507 | |
| 508 | is_in_local_gitignore(project_path) |
| 509 | } |
| 510 | |
| 511 | fn is_ignored_by_git(project_path: &Path, git_config_global: Option<&Path>) -> Option<bool> { |
| 512 | let fallback_global_excludes = || { |
no test coverage detected