feat: add one-click git sync button
Combine fetch, pull with rebase, and push into one sync action Keep remote dropdown focused on safe fetch actions Block sync when uncommitted changes would conflict with rebase
This commit is contained in:
@@ -253,14 +253,15 @@ export async function handleStandardGitBridgeMessage(message: BridgeMessageInput
|
||||
}
|
||||
|
||||
case 'api:git/pull': {
|
||||
const { directory, remote, branch } = (payload || {}) as {
|
||||
const { directory, remote, branch, rebase } = (payload || {}) as {
|
||||
directory?: string;
|
||||
remote?: string;
|
||||
branch?: string;
|
||||
rebase?: boolean;
|
||||
};
|
||||
const dirError = requireDirectory(id, type, directory);
|
||||
if (dirError) return dirError;
|
||||
const result = await gitService.gitPull(directory!, { remote, branch });
|
||||
const result = await gitService.gitPull(directory!, { remote, branch, rebase });
|
||||
return { id, type, success: true, data: result };
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user