| 68 | * Interface for git operations |
| 69 | */ |
| 70 | export interface Git { |
| 71 | /** |
| 72 | * Checks if a directory is a git repository |
| 73 | */ |
| 74 | isGitRepository(dir: string): boolean; |
| 75 | |
| 76 | /** |
| 77 | * Gets the content of .gitignore file in a git repository |
| 78 | */ |
| 79 | getGitIgnoreContent(repoRoot: string): string | null; |
| 80 | |
| 81 | /** |
| 82 | * Gets all files tracked by git (both tracked and untracked but not ignored) |
| 83 | */ |
| 84 | getGitFiles(dirRoot: string): Generator<string>; |
| 85 | |
| 86 | /** |
| 87 | * Gets or creates a cached GitIgnoreFilter for a repository |
| 88 | */ |
| 89 | getGitIgnoreFilter(repoRoot: string): GitIgnoreFilter; |
| 90 | } |
| 91 | |
| 92 | /** |
| 93 | * Node.js implementation of the Git interface using git CLI commands |