| 73 | constructor( |
| 74 | conflictedFiles: string[], |
| 75 | conflictOp: ConflictOp = ConflictOp.MERGE, |
| 76 | context: { |
| 77 | mergeAborted?: boolean; |
| 78 | mergeStrategy?: 'squash' | 'no_ff'; |
| 79 | sourceBranch?: string; |
| 80 | targetBranch?: string; |
| 81 | sourceWorktreePath?: string; |
| 82 | targetWorktreePath?: string; |
| 83 | sourceWorkspaceId?: string; |
| 84 | targetWorkspaceId?: string; |
| 85 | } = {} |
| 86 | ) { |
| 87 | const fileList = conflictedFiles.join(', '); |
| 88 | super( |
| 89 | `Merge conflict in files: ${fileList}`, |
| 90 | 'MERGE_CONFLICT' |
| 91 | ); |
| 92 | this.name = 'MergeConflictError'; |
| 93 | this.conflictedFiles = conflictedFiles; |
| 94 | this.conflictOp = conflictOp; |
| 95 | this.mergeAborted = context.mergeAborted; |
| 96 | this.mergeStrategy = context.mergeStrategy; |
| 97 | this.sourceBranch = context.sourceBranch; |
| 98 | this.targetBranch = context.targetBranch; |
| 99 | this.sourceWorktreePath = context.sourceWorktreePath; |
| 100 | this.targetWorktreePath = context.targetWorktreePath; |
| 101 | this.sourceWorkspaceId = context.sourceWorkspaceId; |
| 102 | this.targetWorkspaceId = context.targetWorkspaceId; |
| 103 | } |
| 104 | } |
| 105 | |
| 106 | export class RebaseInProgressError extends GitError { |
| 107 | constructor() { |
| 108 | super('Rebase in progress; resolve or abort it before retrying', 'REBASE_IN_PROGRESS'); |