Mountain/IPC/WindServiceHandlers/Git.rs
1#![allow(non_snake_case)]
2
3//! # Local Git subprocess handlers
4//!
5//! Mirrors stock VS Code's `ILocalGitService` API
6//! (`src/vs/platform/git/common/localGitService.ts`) plus two
7//! Land-specific extensions: `HandleExec` for arbitrary argv
8//! (used by the Git extension) and `HandleIsAvailable` for
9//! synchronous feature detection.
10//!
11//! Cancellation discipline: every long-running entry point
12//! takes an `operationId`; the spawned PID is registered in
13//! `Shared::RunningProcesses` for the duration of the run.
14//! `HandleCancel(operationId)` looks the PID up and
15//! SIGTERMs / `taskkill`s it so the renderer can fire cancel
16//! from a different `tauri::invoke` than the one that started
17//! the operation.
18//!
19//! Layout (one export per file, file name = identity):
20//! - `HandleExec::HandleExec` - arbitrary argv (object or positional shape).
21//! - `HandleClone::HandleClone`, `HandlePull::HandlePull`,
22//! `HandleCheckout::HandleCheckout`, `HandleRevParse::HandleRevParse`,
23//! `HandleFetch::HandleFetch`, `HandleRevListCount::HandleRevListCount` -
24//! curated `git` operations.
25//! - `HandleCancel::HandleCancel` - SIGTERM / taskkill by op id.
26//! - `HandleIsAvailable::HandleIsAvailable` - cached `git --version` probe.
27//!
28//! `Shared` (private) - `RunGit`, the process registry,
29//! and small parsers.
30
31pub mod HandleCancel;
32pub mod HandleCheckout;
33pub mod HandleClone;
34pub mod HandleExec;
35pub mod HandleFetch;
36pub mod HandleIsAvailable;
37pub mod HandlePull;
38pub mod HandleRevListCount;
39pub mod HandleRevParse;
40
41pub(crate) mod Shared;