> ## Documentation Index
> Fetch the complete documentation index at: https://resq-dependabot-github-actions-github-actions-478e18be3d.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Gitignore

**resq\_cli > gitignore**

# Module: gitignore

## Contents

**Functions**

* [`parse_gitignore`](#parse_gitignore) - Parse `.gitignore` from `root` and return a list of simple directory/file
* [`should_skip_path`](#should_skip_path) - Check whether `path` should be skipped based on its directory components

***

## resq\_cli::gitignore::parse\_gitignore

*Function*

Parse `.gitignore` from `root` and return a list of simple directory/file
names to exclude during traversal.

Strategy (matches the TS `parseGitignore` in `sync-turbo-env.ts`):

* Read `.gitignore`, split into lines
* Strip comments (`#`) and blank lines
* Normalize: remove leading `/` and trailing `/`
* Drop negations (`!`) and wildcard patterns (`*`) — too complex for
  simple component-based matching; these are already handled by git itself
* Always include `.git` and `node_modules` as safety nets

```rust theme={null}
fn parse_gitignore(root: &std::path::Path) -> Vec<String>
```

## resq\_cli::gitignore::should\_skip\_path

*Function*

Check whether `path` should be skipped based on its directory components
matching any entry in `excludes`.

```rust theme={null}
fn should_skip_path(path: &std::path::Path, excludes: &[String]) -> bool
```
