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:
Christoph Brandau
2026-08-18 13:09:33 +02:00
parent a4936ba790
commit e4697c74b6
11 changed files with 608 additions and 53 deletions
+5 -3
View File
@@ -10,8 +10,8 @@ use external_tools::{
detect_external_tools, launch_external_diff, launch_external_merge, launch_external_tool,
};
use git::{
SearchCancellationState, add_remote, add_worktree, amend_commit, apply_file_patch,
cancel_code_search, cancel_file_history, checkout_branch, cherry_pick_abort,
SearchCancellationState, add_remote, add_to_gitignore, add_worktree, amend_commit,
apply_file_patch, cancel_code_search, cancel_file_history, checkout_branch, cherry_pick_abort,
cherry_pick_commit, cherry_pick_continue, clone_repository, commit, commit_ai_generate,
commit_ai_load, commit_ai_local_models, commit_ai_review, commit_ai_split, commit_ai_status,
compare_commits, compare_file_to_head, compare_file_to_parent, create_branch, create_tag,
@@ -30,7 +30,7 @@ use git::{
revert_commit, run_sequence_editor_if_requested, search_code_introductions,
set_branch_upstream, set_commit_note, stage_files, start_interactive_rebase, stash_apply,
stash_drop, stash_pop, stash_push, undo_last_commit, unlock_worktree, unstage_files,
update_remote,
untrack_paths, update_remote,
};
use std::path::{Path, PathBuf};
use std::sync::Mutex;
@@ -254,6 +254,8 @@ async fn main() {
cherry_pick_abort,
stage_files,
unstage_files,
add_to_gitignore,
untrack_paths,
stash_push,
stash_apply,
stash_pop,