diff --git a/extensions/git/resources/icons/dark/status-type-changed.svg b/extensions/git/resources/icons/dark/status-type-changed.svg
new file mode 100644
index 00000000000..ae504ae1881
--- /dev/null
+++ b/extensions/git/resources/icons/dark/status-type-changed.svg
@@ -0,0 +1,6 @@
+
diff --git a/extensions/git/resources/icons/light/status-type-changed.svg b/extensions/git/resources/icons/light/status-type-changed.svg
new file mode 100644
index 00000000000..ae504ae1881
--- /dev/null
+++ b/extensions/git/resources/icons/light/status-type-changed.svg
@@ -0,0 +1,6 @@
+
diff --git a/extensions/git/src/api/api1.ts b/extensions/git/src/api/api1.ts
index 375d07c4198..afa4ad1bcaf 100644
--- a/extensions/git/src/api/api1.ts
+++ b/extensions/git/src/api/api1.ts
@@ -363,6 +363,7 @@ function getStatus(status: Status): string {
case Status.IGNORED: return 'IGNORED';
case Status.INTENT_TO_ADD: return 'INTENT_TO_ADD';
case Status.INTENT_TO_RENAME: return 'INTENT_TO_RENAME';
+ case Status.TYPE_CHANGED: return 'TYPE_CHANGED';
case Status.ADDED_BY_US: return 'ADDED_BY_US';
case Status.ADDED_BY_THEM: return 'ADDED_BY_THEM';
case Status.DELETED_BY_US: return 'DELETED_BY_US';
diff --git a/extensions/git/src/api/git.d.ts b/extensions/git/src/api/git.d.ts
index 30b8c271103..ae1d57d3098 100644
--- a/extensions/git/src/api/git.d.ts
+++ b/extensions/git/src/api/git.d.ts
@@ -79,6 +79,7 @@ export const enum Status {
IGNORED,
INTENT_TO_ADD,
INTENT_TO_RENAME,
+ TYPE_CHANGED,
ADDED_BY_US,
ADDED_BY_THEM,
diff --git a/extensions/git/src/repository.ts b/extensions/git/src/repository.ts
index 1593e7309be..77739e11ce9 100644
--- a/extensions/git/src/repository.ts
+++ b/extensions/git/src/repository.ts
@@ -59,6 +59,7 @@ export class Resource implements SourceControlResourceState {
case Status.IGNORED: return l10n.t('Ignored');
case Status.INTENT_TO_ADD: return l10n.t('Intent to Add');
case Status.INTENT_TO_RENAME: return l10n.t('Intent to Rename');
+ case Status.TYPE_CHANGED: return l10n.t('Type Changed');
case Status.BOTH_DELETED: return l10n.t('Conflict: Both Deleted');
case Status.ADDED_BY_US: return l10n.t('Conflict: Added By Us');
case Status.DELETED_BY_THEM: return l10n.t('Conflict: Deleted By Them');
@@ -112,6 +113,7 @@ export class Resource implements SourceControlResourceState {
Untracked: getIconUri('status-untracked', 'light'),
Ignored: getIconUri('status-ignored', 'light'),
Conflict: getIconUri('status-conflict', 'light'),
+ TypeChanged: getIconUri('status-type-changed', 'light')
},
dark: {
Modified: getIconUri('status-modified', 'dark'),
@@ -121,7 +123,8 @@ export class Resource implements SourceControlResourceState {
Copied: getIconUri('status-copied', 'dark'),
Untracked: getIconUri('status-untracked', 'dark'),
Ignored: getIconUri('status-ignored', 'dark'),
- Conflict: getIconUri('status-conflict', 'dark')
+ Conflict: getIconUri('status-conflict', 'dark'),
+ TypeChanged: getIconUri('status-type-changed', 'dark')
}
};
@@ -138,6 +141,7 @@ export class Resource implements SourceControlResourceState {
case Status.IGNORED: return Resource.Icons[theme].Ignored;
case Status.INTENT_TO_ADD: return Resource.Icons[theme].Added;
case Status.INTENT_TO_RENAME: return Resource.Icons[theme].Renamed;
+ case Status.TYPE_CHANGED: return Resource.Icons[theme].TypeChanged;
case Status.BOTH_DELETED: return Resource.Icons[theme].Conflict;
case Status.ADDED_BY_US: return Resource.Icons[theme].Conflict;
case Status.DELETED_BY_THEM: return Resource.Icons[theme].Conflict;
@@ -197,6 +201,8 @@ export class Resource implements SourceControlResourceState {
case Status.INDEX_RENAMED:
case Status.INTENT_TO_RENAME:
return 'R';
+ case Status.TYPE_CHANGED:
+ return 'T';
case Status.UNTRACKED:
return 'U';
case Status.IGNORED:
@@ -223,6 +229,7 @@ export class Resource implements SourceControlResourceState {
case Status.INDEX_MODIFIED:
return new ThemeColor('gitDecoration.stageModifiedResourceForeground');
case Status.MODIFIED:
+ case Status.TYPE_CHANGED:
return new ThemeColor('gitDecoration.modifiedResourceForeground');
case Status.INDEX_DELETED:
return new ThemeColor('gitDecoration.stageDeletedResourceForeground');
@@ -257,6 +264,7 @@ export class Resource implements SourceControlResourceState {
case Status.INDEX_MODIFIED:
case Status.MODIFIED:
case Status.INDEX_COPIED:
+ case Status.TYPE_CHANGED:
return 2;
case Status.IGNORED:
return 3;
@@ -525,6 +533,7 @@ class ResourceCommandResolver {
case Status.INDEX_RENAMED:
case Status.INDEX_ADDED:
case Status.INTENT_TO_RENAME:
+ case Status.TYPE_CHANGED:
return toGitUri(resource.original, 'HEAD');
case Status.MODIFIED:
@@ -560,7 +569,8 @@ class ResourceCommandResolver {
case Status.UNTRACKED:
case Status.IGNORED:
case Status.INTENT_TO_ADD:
- case Status.INTENT_TO_RENAME: {
+ case Status.INTENT_TO_RENAME:
+ case Status.TYPE_CHANGED: {
const uriString = resource.resourceUri.toString();
const [indexStatus] = this.repository.indexGroup.resourceStates.filter(r => r.resourceUri.toString() === uriString);
@@ -609,6 +619,9 @@ class ResourceCommandResolver {
case Status.INTENT_TO_RENAME:
return l10n.t('{0} (Intent to add)', basename);
+ case Status.TYPE_CHANGED:
+ return l10n.t('{0} (Type changed)', basename);
+
default:
return '';
}
@@ -2188,6 +2201,7 @@ export class Repository implements Disposable {
case 'D': workingTreeGroup.push(new Resource(this.resourceCommandResolver, ResourceGroupType.WorkingTree, uri, Status.DELETED, useIcons, renameUri)); break;
case 'A': workingTreeGroup.push(new Resource(this.resourceCommandResolver, ResourceGroupType.WorkingTree, uri, Status.INTENT_TO_ADD, useIcons, renameUri)); break;
case 'R': workingTreeGroup.push(new Resource(this.resourceCommandResolver, ResourceGroupType.WorkingTree, uri, Status.INTENT_TO_RENAME, useIcons, renameUri)); break;
+ case 'T': workingTreeGroup.push(new Resource(this.resourceCommandResolver, ResourceGroupType.WorkingTree, uri, Status.TYPE_CHANGED, useIcons, renameUri)); break;
}
return undefined;
diff --git a/extensions/github/src/typings/git.d.ts b/extensions/github/src/typings/git.d.ts
index 4b4acd66879..7ac67937a47 100644
--- a/extensions/github/src/typings/git.d.ts
+++ b/extensions/github/src/typings/git.d.ts
@@ -79,6 +79,7 @@ export const enum Status {
IGNORED,
INTENT_TO_ADD,
INTENT_TO_RENAME,
+ TYPE_CHANGED,
ADDED_BY_US,
ADDED_BY_THEM,