{"record":{"id":"6031df009c3f5ab7","repo":"stablyai/orca","slug":"no-base-branch-to-rebase-onto","errorCode":null,"errorMessage":"No base branch to rebase onto","messagePattern":"No base branch to rebase onto","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"warning","filePath":"mobile/src/source-control/use-mobile-source-control-action-sheet-runners.ts","lineNumber":76,"sourceCode":"      await runGitSequence(actionId, steps)\n      setShowActionSheet(false)\n    },\n    [runGitSequence, setShowActionSheet]\n  )\n\n  const runActionSheetGitSync = useCallback(async () => {\n    await runGitSync('sync')\n    setShowActionSheet(false)\n  }, [runGitSync, setShowActionSheet])\n\n  const runActionSheetRebase = useCallback(async () => {\n    await runGitWorkflow('rebase', async () => {\n      if (!client) {\n        throw new Error('Waiting for desktop...')\n      }\n      const baseRef = await resolveMobileBranchCompareBaseRef(client, worktreeId)\n      if (!baseRef) {\n        throw new Error('No base branch to rebase onto')\n      }\n      await sendGitRequest<unknown>('git.rebaseFromBase', { baseRef })\n    })\n    setShowActionSheet(false)\n  }, [client, runGitWorkflow, sendGitRequest, setShowActionSheet, worktreeId])\n\n  return {\n    runActionSheetCommit,\n    runActionSheetCommitSequence,\n    runActionSheetCommitSync,\n    runActionSheetGitSequence,\n    runActionSheetGitSync,\n    runActionSheetRebase\n  }\n}\n","sourceCodeStart":58,"sourceCodeEnd":92,"githubUrl":"https://github.com/stablyai/orca/blob/1136503c6a231a16dce8f921f6fadb63d181e8db/mobile/src/source-control/use-mobile-source-control-action-sheet-runners.ts#L58-L92","documentation":"Thrown by `runActionSheetRebase` when `resolveMobileBranchCompareBaseRef` returns null — meaning none of `worktree.show`, `repo.list`, or `repo.baseRefDefault` yielded a base ref (or all degraded to git-unavailable). Without a base ref there is nothing to rebase onto, so the workflow aborts with this message rather than sending an empty `baseRef` to `git.rebaseFromBase`.","triggerScenarios":"Tapping Rebase on a repo/worktree where no base branch is configured anywhere: worktree has no `baseRef`, the repo summary has no `worktreeBaseRef`, and `repo.baseRefDefault` is unavailable or empty.","commonSituations":"Fresh repo with no default branch set; the repo's `origin/HEAD` is unset so the host cannot infer a base; the host build is too old to expose `repo.baseRefDefault` and the other fields are also blank.","solutions":["Configure a default/base branch on the host repo (set `origin/HEAD` or the repo's base-ref setting).","Update the desktop host so `repo.baseRefDefault` resolves a sensible default.","Use a different workflow (explicit merge/sync) until a base ref is configured."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// Resolve the base ref first; only enable Rebase if one exists.\nconst baseRef = await resolveMobileBranchCompareBaseRef(client, worktreeId)\nconst canRebase = baseRef !== null","typeGuard":null,"tryCatchPattern":"try {\n  await runActionSheetRebase()\n} catch (err) {\n  if (err instanceof Error && err.message === 'No base branch to rebase onto') {\n    setActionError('Configure a base branch on the host to enable rebase.')\n  } else throw err\n}","preventionTips":["Configure a default/base branch (origin/HEAD) on repos that need rebase.","Hide Rebase when resolveMobileBranchCompareBaseRef returns null.","Update the host so repo.baseRefDefault infers a sensible default."],"tags":["source-control","git","rebase","config"],"backgroundTag":null,"analyzedSha":"1136503c6a231a16dce8f921f6fadb63d181e8db","analyzedAt":"2026-08-12T23:15:58.167Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}