MCPcopy Create free account
hub / github.com/ScriptedAlchemy/tracedecay / is_in_gitignore

Function is_in_gitignore

src/config.rs:503–509  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

501/// (for example outside a Git repository), falls back to checking the local
502/// `.gitignore` file only.
503pub 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
511fn is_ignored_by_git(project_path: &Path, git_config_global: Option<&Path>) -> Option<bool> {
512 let fallback_global_excludes = || {

Callers 2

init_and_indexFunction · 0.85
handle_status_commandFunction · 0.85

Calls 2

is_ignored_by_gitFunction · 0.85
is_in_local_gitignoreFunction · 0.85

Tested by

no test coverage detected