feat(git): add opt-in for unrelated histories during pull
Allow pulling repositories with unrelated commit histories when the user explicitly opts in. The pull argument construction was refactored and branch resolution made more robust so the backend can include the --allow-unrelated-histories flag when requested. - Extract pull argument logic and add support for allowing unrelated histories. - Prompt users in the UI to confirm merging separate histories and retry pull. - Restyle and improve the update toast UI for better layout and responsiveness.
This commit is contained in:
+18
-2
@@ -405,8 +405,24 @@ export function commitAiSplit(path: string, options: CommitAiGenerateOptions): P
|
||||
});
|
||||
}
|
||||
|
||||
export function pull(path: string, username?: string, password?: string, strategy: PullStrategy = "merge", remote?: string, branch?: string): Promise<GitStatus> {
|
||||
return invoke<GitStatus>("pull", { path, username: username ?? null, password: password ?? null, strategy, remote: remote || null, branch: branch || null });
|
||||
export function pull(
|
||||
path: string,
|
||||
username?: string,
|
||||
password?: string,
|
||||
strategy: PullStrategy = "merge",
|
||||
remote?: string,
|
||||
branch?: string,
|
||||
allowUnrelatedHistories = false,
|
||||
): Promise<GitStatus> {
|
||||
return invoke<GitStatus>("pull", {
|
||||
path,
|
||||
username: username ?? null,
|
||||
password: password ?? null,
|
||||
strategy,
|
||||
remote: remote || null,
|
||||
branch: branch || null,
|
||||
allowUnrelatedHistories,
|
||||
});
|
||||
}
|
||||
|
||||
export function fetchRemote(path: string, username?: string, password?: string, prune = false, remote?: string): Promise<GitStatus> {
|
||||
|
||||
Reference in New Issue
Block a user