mirror of
https://gitlab.com/soapbox-pub/shakespeare.git
synced 2026-12-05 08:23:34 +00:00
Fix fast-forward merge error requiring http parameter
The git.fastForward() function requires an http client for fetching from remote, which we don't need for local branch merges. Changed to use git.writeRef() to directly update the branch reference to point to the source branch commit, which is the correct way to do a local fast-forward merge without needing network operations.
This commit is contained in:
1 parent
97791ed21a
commit
34b7f9110a
1 file changed
+5
-4
@@ -220,11 +220,12 @@ export function MergeDialog({
|
||||
}).catch(() => false);
|
||||
|
||||
if (canFastForward) {
|
||||
// Fast-forward merge: just update the current branch ref
|
||||
await git.fastForward({
|
||||
// Fast-forward merge: update the current branch to point to source branch commit
|
||||
await git.writeRef({
|
||||
dir: projectPath,
|
||||
ref: currentBranch,
|
||||
singleBranch: true,
|
||||
ref: `refs/heads/${currentBranch}`,
|
||||
value: sourceOid,
|
||||
force: true,
|
||||
});
|
||||
|
||||
// Update working directory to match the new HEAD
|
||||
|
||||
Reference in new issue
Block a user