Split git backend into modules and add history filters and issue branch UI #65
No reviewers
Labels
No labels
bug
duplicate
enhancement
help wanted
invalid
question
state: Done
state: New
state: To Do
type: Bug
type: Feature
type: Task
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
Christoph/Gitty!65
Loading…
Reference in a new issue
No description provided.
Delete branch "opt"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This change refactors the monolithic git backend and adds history search/filter features plus an Issue Center branch creation flow.
Summary
The large
src-tauri/src/git.rsfile has been split into many submodules (examples:ai,bisect,branches,commit,compare,conflicts,credentials,history,history_search,lfs,merge,notes,process,rebase,remotes,repository,staging,stash,status,sync,tags,types,worktrees) and those modules are re-exported withpub useat the top ofgit.rs. This centralizes and modularizes Git functionality while keeping many symbols available via thegitfacade.Several previously inline types and helpers were removed from the large file body (they appear to have been relocated into the new modules). The diff shows many structs/enums and helper functions were taken out of the monolithic file and replaced by smaller, focused helpers in the refactored layout.
New repository and filesystem helper functions were added to the backend surface:
resolve_repoandgit_dir_for_repoto resolve repository paths using git.resolve_repo_child_pathto validate and canonicalize file paths that must stay inside the repo (rejects absolute paths and..).normalize_git_pathandparse_nul_pathsfor path normalization and NUL-separated output parsing.git_path_exists,rebase_in_progress,cherry_pick_in_progress,merge_in_progressto detect Git internal state.open_path_in_file_managerandreveal_path_in_file_manager) with platform-specific implementations for Windows, macOS and other Unix.file_status_indexto build a lookup fromGitFileStatusslices.Some previously present search cancellation and sequence-editor/commit-editor helpers (e.g.
SearchCancellationState,SearchCancellation,run_sequence_editor_if_requested,apply_reword_message) are removed from this file in the diff; they were likely moved into appropriate modules as part of the split.CHANGELOG.md updated to document user-visible additions that match the code changes:
12-login-fails), and while that branch is checked out the commit panel offers to appendFixes #12to commit messages.Testing
No test execution results were provided.
Recommended reviewer checks
cargo build(andcargo testif applicable) to validate the refactor did not break public API usage across the codebase.Fixes #<issue>while that branch is checked out.resolve_repo_child_pathbehavior with absolute paths and..references to ensure they are rejected.git.rs(if some types were not re-exported, update imports accordingly).Compatibility / migration notes
The file-splitting appears to retain a façade via
pub usere-exports to minimize import breakage, but reviewers should still verify any code that relied on private/internal locations or on types that might not have been re-exported.The search-cancellation and sequence/commit editor helpers that were present in the old
git.rsare no longer in this file; if other code referenced them by path, update imports to the new module locations (they were likely moved as part of the split).Risks
Notes
If you want, I can run through or suggest exact grep commands to find remaining call sites that might need import fixes (for example searching for previously-file-scoped type names) or prepare a short checklist of symbols to verify.
Pull request closed