Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
return RebaseResult.Aborted
}
const rebaseCurrentCommit = await readRebaseHead(repository)
if (rebaseCurrentCommit === null) {
return RebaseResult.Aborted
}
const trackedFilesAfter = status.workingDirectory.files.filter(
f => f.status.kind !== AppFileStatusKind.Untracked
)
const baseOptions: IGitExecutionOptions = {
expectedErrors: new Set([
GitError.RebaseConflicts,
GitError.UnresolvedConflicts,
]),
}
let options = baseOptions
if (progressCallback !== undefined) {
const snapshot = await getRebaseSnapshot(repository)
if (snapshot === null) {
log.warn(
`[continueRebase] unable to get rebase status, skipping any other steps`
)
return RebaseResult.Aborted
}
const { progress } = snapshot
function parseRebaseResult(result: IGitResult): RebaseResult {
if (result.exitCode === 0) {
return RebaseResult.CompletedWithoutError
}
if (result.gitError === GitError.RebaseConflicts) {
return RebaseResult.ConflictsEncountered
}
if (result.gitError === GitError.UnresolvedConflicts) {
return RebaseResult.OutstandingFilesNotStaged
}
throw new Error(`Unhandled result found: '${JSON.stringify(result)}'`)
}