feat(git-lfs): add Git LFS status and sidecar bundling

Adds Git LFS support to the backend API and related UI.
The app now exposes commands to inspect, install, track and pull.
A sidecar git-lfs binary is bundled and a prep script is added.
This prepares the correct binary for each target platform.

- Expose Git LFS status and management commands in API
- Bundle and prepare a sidecar git-lfs binary for targets
- Update packaging, docs, and README with LFS notes
This commit is contained in:
Christoph Brandau
2026-08-17 20:27:54 +02:00
parent 6f2d4dd8c9
commit cd01df0108
18 changed files with 1444 additions and 16 deletions
+30
View File
@@ -14,6 +14,7 @@ import type {
GitBranch,
GitCommit,
GitCommitComparison,
GitLfsStatus,
GitRepositoryFile,
GitRemote,
MergeStrategy,
@@ -90,6 +91,35 @@ export function getStatus(path: string): Promise<GitStatus> {
return invoke<GitStatus>("get_status", { path });
}
export function getGitLfsStatus(path: string): Promise<GitLfsStatus> {
return invoke<GitLfsStatus>("git_lfs_status", { path });
}
export function installGitLfs(path: string): Promise<GitLfsStatus> {
return invoke<GitLfsStatus>("git_lfs_install", { path });
}
export function trackGitLfsPattern(path: string, pattern: string, lockable = false): Promise<GitLfsStatus> {
return invoke<GitLfsStatus>("git_lfs_track", { path, pattern, lockable });
}
export function untrackGitLfsPattern(path: string, pattern: string): Promise<GitLfsStatus> {
return invoke<GitLfsStatus>("git_lfs_untrack", { path, pattern });
}
export function pullGitLfsObjects(path: string, remote?: string, username?: string, password?: string): Promise<GitLfsStatus> {
return invoke<GitLfsStatus>("git_lfs_pull", {
path,
remote: remote || null,
username: username ?? null,
password: password ?? null,
});
}
export function pruneGitLfsObjects(path: string): Promise<GitLfsStatus> {
return invoke<GitLfsStatus>("git_lfs_prune", { path });
}
// Sets the taskbar icon badge to ahead + behind + changed status files (0 clears it). Windows only — a no-op on
// other platforms, since Windows has no native numeric badge to fall back to.
export function setSyncBadge(ahead: number, behind: number, changes: number): Promise<void> {