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:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user