MCPcopy
hub / github.com/desktop/desktop / getLabelForManualResolutionOption

Function getLabelForManualResolutionOption

app/src/lib/status.ts:118–135  ·  view source on GitHub ↗
(
  entry: UnmergedStatusEntry,
  branch?: string
)

Source from the content-addressed store, hash-verified

116 * intended for use with manually resolved merge conflicts
117 */
118export 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 */
138export function getUnmergedFiles(status: WorkingDirectoryStatus) {

Callers 1

Calls 1

assertNeverFunction · 0.90

Tested by

no test coverage detected