@@ -59,6 +59,7 @@ export class Resource implements SourceControlResourceState {
59
59
case Status . IGNORED : return l10n . t ( 'Ignored' ) ;
60
60
case Status . INTENT_TO_ADD : return l10n . t ( 'Intent to Add' ) ;
61
61
case Status . INTENT_TO_RENAME : return l10n . t ( 'Intent to Rename' ) ;
62
+ case Status . TYPE_CHANGED : return l10n . t ( 'Type Changed' ) ;
62
63
case Status . BOTH_DELETED : return l10n . t ( 'Conflict: Both Deleted' ) ;
63
64
case Status . ADDED_BY_US : return l10n . t ( 'Conflict: Added By Us' ) ;
64
65
case Status . DELETED_BY_THEM : return l10n . t ( 'Conflict: Deleted By Them' ) ;
@@ -112,6 +113,7 @@ export class Resource implements SourceControlResourceState {
112
113
Untracked : getIconUri ( 'status-untracked' , 'light' ) ,
113
114
Ignored : getIconUri ( 'status-ignored' , 'light' ) ,
114
115
Conflict : getIconUri ( 'status-conflict' , 'light' ) ,
116
+ TypeChanged : getIconUri ( 'status-type-changed' , 'light' )
115
117
} ,
116
118
dark : {
117
119
Modified : getIconUri ( 'status-modified' , 'dark' ) ,
@@ -121,7 +123,8 @@ export class Resource implements SourceControlResourceState {
121
123
Copied : getIconUri ( 'status-copied' , 'dark' ) ,
122
124
Untracked : getIconUri ( 'status-untracked' , 'dark' ) ,
123
125
Ignored : getIconUri ( 'status-ignored' , 'dark' ) ,
124
- Conflict : getIconUri ( 'status-conflict' , 'dark' )
126
+ Conflict : getIconUri ( 'status-conflict' , 'dark' ) ,
127
+ TypeChanged : getIconUri ( 'status-type-changed' , 'dark' )
125
128
}
126
129
} ;
127
130
@@ -138,6 +141,7 @@ export class Resource implements SourceControlResourceState {
138
141
case Status . IGNORED : return Resource . Icons [ theme ] . Ignored ;
139
142
case Status . INTENT_TO_ADD : return Resource . Icons [ theme ] . Added ;
140
143
case Status . INTENT_TO_RENAME : return Resource . Icons [ theme ] . Renamed ;
144
+ case Status . TYPE_CHANGED : return Resource . Icons [ theme ] . TypeChanged ;
141
145
case Status . BOTH_DELETED : return Resource . Icons [ theme ] . Conflict ;
142
146
case Status . ADDED_BY_US : return Resource . Icons [ theme ] . Conflict ;
143
147
case Status . DELETED_BY_THEM : return Resource . Icons [ theme ] . Conflict ;
@@ -197,6 +201,8 @@ export class Resource implements SourceControlResourceState {
197
201
case Status . INDEX_RENAMED :
198
202
case Status . INTENT_TO_RENAME :
199
203
return 'R' ;
204
+ case Status . TYPE_CHANGED :
205
+ return 'T' ;
200
206
case Status . UNTRACKED :
201
207
return 'U' ;
202
208
case Status . IGNORED :
@@ -223,6 +229,7 @@ export class Resource implements SourceControlResourceState {
223
229
case Status . INDEX_MODIFIED :
224
230
return new ThemeColor ( 'gitDecoration.stageModifiedResourceForeground' ) ;
225
231
case Status . MODIFIED :
232
+ case Status . TYPE_CHANGED :
226
233
return new ThemeColor ( 'gitDecoration.modifiedResourceForeground' ) ;
227
234
case Status . INDEX_DELETED :
228
235
return new ThemeColor ( 'gitDecoration.stageDeletedResourceForeground' ) ;
@@ -257,6 +264,7 @@ export class Resource implements SourceControlResourceState {
257
264
case Status . INDEX_MODIFIED :
258
265
case Status . MODIFIED :
259
266
case Status . INDEX_COPIED :
267
+ case Status . TYPE_CHANGED :
260
268
return 2 ;
261
269
case Status . IGNORED :
262
270
return 3 ;
@@ -525,6 +533,7 @@ class ResourceCommandResolver {
525
533
case Status . INDEX_RENAMED :
526
534
case Status . INDEX_ADDED :
527
535
case Status . INTENT_TO_RENAME :
536
+ case Status . TYPE_CHANGED :
528
537
return toGitUri ( resource . original , 'HEAD' ) ;
529
538
530
539
case Status . MODIFIED :
@@ -560,7 +569,8 @@ class ResourceCommandResolver {
560
569
case Status . UNTRACKED :
561
570
case Status . IGNORED :
562
571
case Status . INTENT_TO_ADD :
563
- case Status . INTENT_TO_RENAME : {
572
+ case Status . INTENT_TO_RENAME :
573
+ case Status . TYPE_CHANGED : {
564
574
const uriString = resource . resourceUri . toString ( ) ;
565
575
const [ indexStatus ] = this . repository . indexGroup . resourceStates . filter ( r => r . resourceUri . toString ( ) === uriString ) ;
566
576
@@ -609,6 +619,9 @@ class ResourceCommandResolver {
609
619
case Status . INTENT_TO_RENAME :
610
620
return l10n . t ( '{0} (Intent to add)' , basename ) ;
611
621
622
+ case Status . TYPE_CHANGED :
623
+ return l10n . t ( '{0} (Type changed)' , basename ) ;
624
+
612
625
default :
613
626
return '' ;
614
627
}
@@ -2188,6 +2201,7 @@ export class Repository implements Disposable {
2188
2201
case 'D' : workingTreeGroup . push ( new Resource ( this . resourceCommandResolver , ResourceGroupType . WorkingTree , uri , Status . DELETED , useIcons , renameUri ) ) ; break ;
2189
2202
case 'A' : workingTreeGroup . push ( new Resource ( this . resourceCommandResolver , ResourceGroupType . WorkingTree , uri , Status . INTENT_TO_ADD , useIcons , renameUri ) ) ; break ;
2190
2203
case 'R' : workingTreeGroup . push ( new Resource ( this . resourceCommandResolver , ResourceGroupType . WorkingTree , uri , Status . INTENT_TO_RENAME , useIcons , renameUri ) ) ; break ;
2204
+ case 'T' : workingTreeGroup . push ( new Resource ( this . resourceCommandResolver , ResourceGroupType . WorkingTree , uri , Status . TYPE_CHANGED , useIcons , renameUri ) ) ; break ;
2191
2205
}
2192
2206
2193
2207
return undefined ;
0 commit comments