Skip to content

Commit d7b87f0

Browse files
committed
Remove deleted file badge (not visible in file explorer)
1 parent 2a7ce6e commit d7b87f0

File tree

6 files changed

+9
-20
lines changed

6 files changed

+9
-20
lines changed

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,6 @@ Colored dots (●) are displayed next to files in the file explorer:
8484
|-------|--------|
8585
| ![Modified](badges/modified.svg) Yellow | Modified |
8686
| ![Added](badges/added.svg) Green | New/Added |
87-
| ![Deleted](badges/deleted.svg) Red | Deleted |
8887
| ![Conflict](badges/conflict.svg) Red | Conflict |
8988
| ![Renamed](badges/renamed.svg) Blue | Renamed |
9089

badges/deleted.svg

Lines changed: 0 additions & 1 deletion
This file was deleted.

main.js

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/git.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ export async function setRemoteUrl(cwd: string, gitPath: string, url: string): P
144144
}
145145
}
146146

147-
export type FileStatus = "M" | "A" | "D" | "R" | "U" | "?" | "";
147+
export type FileStatus = "M" | "A" | "R" | "U" | "?" | "";
148148

149149
export async function getFileStatuses(cwd: string, gitPath: string): Promise<Map<string, FileStatus>> {
150150
const statusMap = new Map<string, FileStatus>();
@@ -168,8 +168,6 @@ export async function getFileStatuses(cwd: string, gitPath: string): Promise<Map
168168
status = "A"; // Untracked = new file
169169
} else if (xy.includes("A")) {
170170
status = "A"; // Added
171-
} else if (xy.includes("D")) {
172-
status = "D"; // Deleted
173171
} else if (xy.includes("R")) {
174172
status = "R"; // Renamed
175173
} else if (xy.includes("M") || xy.includes("U")) {

src/main.ts

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -394,11 +394,10 @@ export default class AutoGitPlugin extends Plugin {
394394

395395
private statusPriority(status: FileStatus): number {
396396
switch (status) {
397-
case "U": return 5; // Conflict - highest priority
398-
case "A": return 4;
399-
case "M": return 3;
400-
case "R": return 2;
401-
case "D": return 1;
397+
case "U": return 4; // Conflict - highest priority
398+
case "A": return 3;
399+
case "M": return 2;
400+
case "R": return 1;
402401
default: return 0;
403402
}
404403
}
@@ -414,8 +413,6 @@ export default class AutoGitPlugin extends Plugin {
414413
badge.classList.add("modified");
415414
} else if (status === "A") {
416415
badge.classList.add("added");
417-
} else if (status === "D") {
418-
badge.classList.add("deleted");
419416
} else if (status === "R") {
420417
badge.classList.add("renamed");
421418
}

styles.css

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,6 @@
1717
color: #98c379;
1818
}
1919

20-
.git-status-badge.deleted {
21-
color: #e06c75;
22-
}
23-
2420
.git-status-badge.renamed {
2521
color: #61afef;
2622
}

0 commit comments

Comments
 (0)