-
Notifications
You must be signed in to change notification settings - Fork 10.2k
Closed
Description
Currently, our status models parse Added files and Untracked files as AppFileStatusKind.New. Unfortunately, this means we lose information in the application about which files are which.
desktop/app/src/lib/git/status.ts
Lines 104 to 130 in b556ff8
| function convertToAppStatus( | |
| path: string, | |
| entry: FileEntry, | |
| filesWithConflictMarkers: ConflictCountsByPath, | |
| oldPath?: string | |
| ): AppFileStatus { | |
| if (entry.kind === 'ordinary') { | |
| switch (entry.type) { | |
| case 'added': | |
| return { kind: AppFileStatusKind.New } | |
| case 'modified': | |
| return { kind: AppFileStatusKind.Modified } | |
| case 'deleted': | |
| return { kind: AppFileStatusKind.Deleted } | |
| } | |
| } else if (entry.kind === 'copied' && oldPath != null) { | |
| return { kind: AppFileStatusKind.Copied, oldPath } | |
| } else if (entry.kind === 'renamed' && oldPath != null) { | |
| return { kind: AppFileStatusKind.Renamed, oldPath } | |
| } else if (entry.kind === 'untracked') { | |
| return { kind: AppFileStatusKind.New } | |
| } else if (entry.kind === 'conflicted') { | |
| return parseConflictedState(entry, path, filesWithConflictMarkers) | |
| } | |
| return fatalError(`Unknown file status ${status}`) | |
| } |
This issue proposes adding an AppFileStatusKind.Untracked to cover this case.
required to fix #6411
Reactions are currently unavailable