Skip to content

Commit 91b326b

Browse files
committed
refactor: git overhaul with git2 lib
- replace Git Pane status and diff loading with git2-backed Rust commands - split Git Pane data flow into summary loading and per-file diff loading - move diff parsing into Rust and return structured rows to the frontend - lazily load file diffs, cache detail results across collapse and reopen, and avoid preloading large diffs - auto-expand only the first 10 files per section and keep large diffs collapsed by default - keep binary files in staged and unstaged lists while rendering them as placeholder-only cards - synthesize diffs for untracked text files so additions, line numbers, and content render correctly - disable syntax highlighting for large diffs and plain-text or data extensions - preserve git commit hooks, signing, and amend semantics by delegating commit operations to the git CLI - fix rename diff loading and unstage-all behavior so old and new paths stay in sync - add regression coverage for untracked diffs, rename detail handling, binary visibility, and rename unstage behavior
1 parent 9099934 commit 91b326b

10 files changed

Lines changed: 1436 additions & 527 deletions

File tree

apps/desktop/src-tauri/Cargo.lock

Lines changed: 92 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

apps/desktop/src-tauri/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ tauri-plugin-dialog = "2"
1212
tauri-plugin-notification = "2"
1313
portable-pty = "0.8"
1414
base64 = "0.22"
15+
git2 = "0.20"
1516
serde = { version = "1", features = ["derive"] }
1617
serde_json = "1"
1718

apps/desktop/src-tauri/gen/schemas/acl-manifests.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

apps/desktop/src-tauri/permissions/app.toml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ commands.allow = [
99
"resolve_repo_root",
1010
"get_git_branch",
1111
"rename_git_branch",
12-
"get_git_diff",
12+
"get_git_change_summary",
13+
"get_git_file_diff",
1314
"stage_all_changes",
1415
"unstage_all_changes",
1516
"discard_all_changes",
@@ -39,7 +40,8 @@ commands.allow = [
3940
"resolve_repo_root",
4041
"get_git_branch",
4142
"rename_git_branch",
42-
"get_git_diff",
43+
"get_git_change_summary",
44+
"get_git_file_diff",
4345
"stage_all_changes",
4446
"unstage_all_changes",
4547
"discard_all_changes",

0 commit comments

Comments
 (0)