Files
GitLite/src-tauri/src/main.rs
T
Christoph Brandau fe392d38bf Optimize repository loading and enhance Git UI
Consolidate multiple Git backend calls into a single bundle to reduce
overhead when opening and auto-refreshing repositories. This significantly
improves performance by fetching status, branches, commits, and files
in one optimized operation, instead of re-running 'git rev-parse' and
'git status' multiple times.

Also, streamline commit history loading by fetching file changes inline
via 'git log --name-status -z', eliminating expensive per-commit
'git diff-tree' processes.

Additionally, introduce the ability to create new branches from a
specific commit in the history and refactor the commit comparison
feature into a dedicated dialog. The status panel now displays concise
file names.
2026-07-01 11:39:22 +02:00

57 lines
1.9 KiB
Rust

#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")]
mod git;
use git::{
cancel_code_search, checkout_branch, commit, compare_commits, compare_file_to_head,
compare_file_to_parent, create_branch, cred_delete, cred_load, cred_save,
diff_file_against_working_tree, get_remote_url, get_status, list_branches, list_commits,
list_file_history, list_repository_files, merge_branch, open_repository,
open_repository_bundle, pull, push,
read_conflict, resolve_conflict, resolve_conflict_side, restore_file_from_commit,
restore_files, restore_to_commit, search_code_introductions, stage_files, unstage_files,
SearchCancellationState,
};
fn main() {
tauri::Builder::default()
.plugin(tauri_plugin_updater::Builder::new().build())
.manage(SearchCancellationState::default())
.plugin(tauri_plugin_dialog::init())
.invoke_handler(tauri::generate_handler![
open_repository,
get_status,
list_branches,
checkout_branch,
create_branch,
stage_files,
unstage_files,
restore_files,
commit,
pull,
push,
list_commits,
restore_to_commit,
restore_file_from_commit,
merge_branch,
list_repository_files,
open_repository_bundle,
list_file_history,
compare_commits,
compare_file_to_head,
compare_file_to_parent,
diff_file_against_working_tree,
search_code_introductions,
cancel_code_search,
read_conflict,
resolve_conflict,
resolve_conflict_side,
get_remote_url,
cred_load,
cred_save,
cred_delete
])
.run(tauri::generate_context!())
.expect("error while running tauri application");
}