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