mirror of
https://github.com/stablyai/orca.git
synced 2026-10-31 00:57:45 +00:00
* [comment audit] Shorten daemon, hook, and emulator comments [skip ci] * [comment audit] Shorten VM, conversation, SQLite, and theme-import comments [skip ci] * [comment audit] Tighten Git execution and source-control comment contracts [skip ci] * [comment audit] Clarify repository probes and maintenance comments [skip ci] * [comment audit] Shorten status, diff-cache, and checkout comments [skip ci] * [comment audit] Clarify worktree lifecycle and WSL routing comments [skip ci] * [comment audit] Shorten forge identity and review-refresh comments [skip ci] * [comment audit] Tighten hosted-review client comment contracts [skip ci] * [comment audit] Clarify GitLab compatibility and review comments [skip ci] * [comment audit] Tighten hook ownership and watchdog rationale [skip ci] * [comment audit] Condense host and integration compatibility comments [skip ci] * [comment audit] Clarify IPC authority and remote-routing rationale [skip ci] * [comment audit] Finalize file-import and containment comment cleanup * [comment audit] Fix stale Jira type imports blocking full CI --------- Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
32 lines
1.0 KiB
TypeScript
32 lines
1.0 KiB
TypeScript
import { normalizeGitErrorMessage } from '../../shared/git-remote-error'
|
|
import {
|
|
syncForkDefaultBranch,
|
|
type GitForkSyncExpectedUpstream,
|
|
type GitForkSyncResult
|
|
} from '../../shared/git-fork-sync'
|
|
import type { GitRuntimeOptions } from './git-runtime-options'
|
|
import { gitOptionsForWorktree } from './git-runtime-options'
|
|
import { gitExecFileAsync } from './runner'
|
|
import { abortSignalWithTimeout } from '../lib/abort-signal-with-timeout'
|
|
|
|
export async function gitSyncForkDefaultBranch(
|
|
worktreePath: string,
|
|
expectedUpstream: GitForkSyncExpectedUpstream,
|
|
options: GitRuntimeOptions = {}
|
|
): Promise<GitForkSyncResult> {
|
|
const signal = abortSignalWithTimeout(options.signal, 60_000)
|
|
try {
|
|
return await syncForkDefaultBranch(
|
|
(args) =>
|
|
gitExecFileAsync(args, {
|
|
...gitOptionsForWorktree(worktreePath, options),
|
|
timeout: 60_000,
|
|
signal
|
|
}),
|
|
{ expectedUpstream }
|
|
)
|
|
} catch (error) {
|
|
throw new Error(normalizeGitErrorMessage(error, 'push'))
|
|
}
|
|
}
|