( entry: UnmergedStatusEntry, branch?: string )
| 116 | * intended for use with manually resolved merge conflicts |
| 117 | */ |
| 118 | export function getLabelForManualResolutionOption( |
| 119 | entry: UnmergedStatusEntry, |
| 120 | branch?: string |
| 121 | ): string { |
| 122 | const suffix = branch ? ` from ${branch}` : '' |
| 123 | |
| 124 | switch (entry) { |
| 125 | case GitStatusEntry.Added: |
| 126 | return `Use the added file${suffix}` |
| 127 | case GitStatusEntry.UpdatedButUnmerged: |
| 128 | return `Use the modified file${suffix}` |
| 129 | case GitStatusEntry.Deleted: |
| 130 | const deleteSuffix = branch ? ` on ${branch}` : '' |
| 131 | return `Do not include this file${deleteSuffix}` |
| 132 | default: |
| 133 | return assertNever(entry, 'Unknown status entry to format') |
| 134 | } |
| 135 | } |
| 136 | |
| 137 | /** Filter working directory changes for conflicted or resolved files */ |
| 138 | export function getUnmergedFiles(status: WorkingDirectoryStatus) { |
no test coverage detected