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:
Bohdan Triapitsyn
2026-05-05 20:45:31 +03:00
parent ddfd2db0b8
commit c80c2b62a8
17 changed files with 217 additions and 209 deletions
+4 -1
View File
@@ -1804,12 +1804,15 @@ export async function collectDiffs(directory, files = []) {
export async function pull(directory, options = {}) {
const git = await createGit(directory);
const pullOptions = options.rebase === true
? { ...(options.options && typeof options.options === 'object' && !Array.isArray(options.options) ? options.options : {}), '--rebase': null }
: options.options || {};
try {
const result = await git.pull(
options.remote || 'origin',
options.branch,
options.options || {}
pullOptions
);
return {