git: Fix force-added files always showing as ignored (#47057)

prayansh_chhablani created

Closes #15231
changes the priority in the way files are color-labelled..making sure
forcely added files are highlighted appropriately.
Release Notes:

- N/A *or* Added/Fixed/Improved ...

Change summary

crates/editor/src/items.rs | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

Detailed changes

crates/editor/src/items.rs 🔗

@@ -1917,14 +1917,14 @@ pub fn entry_diagnostic_aware_icon_decoration_and_color(
 
 pub fn entry_git_aware_label_color(git_status: GitSummary, ignored: bool, selected: bool) -> Color {
     let tracked = git_status.index + git_status.worktree;
-    if ignored {
-        Color::Ignored
-    } else if git_status.conflict > 0 {
+    if git_status.conflict > 0 {
         Color::Conflict
     } else if tracked.modified > 0 {
         Color::Modified
     } else if tracked.added > 0 || git_status.untracked > 0 {
         Color::Created
+    } else if ignored {
+        Color::Ignored
     } else {
         entry_label_color(selected)
     }