This commit is contained in:
Christoph Brandau
2026-06-27 14:11:51 +02:00
parent 6a78e768bc
commit ef1974f31f
7 changed files with 849 additions and 6 deletions
+13
View File
@@ -1,6 +1,7 @@
import { invoke } from "@tauri-apps/api/core";
import type {
ConflictFile,
GitBranch,
GitCommit,
GitCommitComparison,
@@ -95,3 +96,15 @@ export function diffFileAgainstWorkingTree(
): Promise<GitCommitComparison> {
return invoke<GitCommitComparison>("diff_file_against_working_tree", { path, commit, file });
}
export function readConflict(path: string, file: string): Promise<ConflictFile> {
return invoke<ConflictFile>("read_conflict", { path, file });
}
export function resolveConflict(
path: string,
file: string,
content: string,
): Promise<GitStatus> {
return invoke<GitStatus>("resolve_conflict", { path, file, content });
}
+8
View File
@@ -69,3 +69,11 @@ export interface GitCommitComparison {
files: GitDiffFile[];
patch: string;
}
export interface ConflictFile {
path: string;
content: string;
ours: string | null;
theirs: string | null;
base: string | null;
}