feat(git): add ignore and untrack paths commands
The changes introduce server-side commands to manage gitignore rules and to untrack paths without deleting local files. A new GitIgnoreKind enum and helper functions normalize targets and build proper ignore patterns, and UI code was wired to use these commands. - add_to_gitignore command and related helpers - untrack_paths command to remove paths from the index - UI wiring to expose ignore and untrack actions in explorer
This commit is contained in:
@@ -14,6 +14,7 @@ import type {
|
||||
GitBranch,
|
||||
GitCommit,
|
||||
GitCommitComparison,
|
||||
GitIgnoreKind,
|
||||
GitLfsStatus,
|
||||
GitRepositoryFile,
|
||||
GitRemote,
|
||||
@@ -291,6 +292,14 @@ export function unstageFiles(path: string, files: string[]): Promise<GitStatus>
|
||||
return invoke<GitStatus>("unstage_files", { path, files });
|
||||
}
|
||||
|
||||
export function addToGitignore(path: string, target: string, kind: GitIgnoreKind): Promise<GitStatus> {
|
||||
return invoke<GitStatus>("add_to_gitignore", { path, target, kind });
|
||||
}
|
||||
|
||||
export function untrackPaths(path: string, targets: string[]): Promise<GitStatus> {
|
||||
return invoke<GitStatus>("untrack_paths", { path, targets });
|
||||
}
|
||||
|
||||
export function restoreFiles(
|
||||
path: string,
|
||||
files: string[],
|
||||
|
||||
Reference in New Issue
Block a user