diff --git a/extensions/git/src/api/git.d.ts b/extensions/git/src/api/git.d.ts index 1b3ed4d2dec..eb128be6609 100644 --- a/extensions/git/src/api/git.d.ts +++ b/extensions/git/src/api/git.d.ts @@ -67,6 +67,7 @@ export const enum Status { DELETED, UNTRACKED, IGNORED, + INTENT_TO_ADD, ADDED_BY_US, ADDED_BY_THEM, diff --git a/extensions/git/src/commands.ts b/extensions/git/src/commands.ts index 2e83594e45b..c07517aa21b 100755 --- a/extensions/git/src/commands.ts +++ b/extensions/git/src/commands.ts @@ -340,6 +340,7 @@ export class CommandCenter { case Status.MODIFIED: case Status.UNTRACKED: case Status.IGNORED: + case Status.INTENT_TO_ADD: const repository = this.model.getRepository(resource.resourceUri); if (!repository) { diff --git a/extensions/git/src/repository.ts b/extensions/git/src/repository.ts index 723cde0ed7d..d97fcca9e13 100644 --- a/extensions/git/src/repository.ts +++ b/extensions/git/src/repository.ts @@ -94,6 +94,7 @@ export class Resource implements SourceControlResourceState { case Status.INDEX_COPIED: return Resource.Icons[theme].Copied; case Status.UNTRACKED: return Resource.Icons[theme].Untracked; case Status.IGNORED: return Resource.Icons[theme].Ignored; + case Status.INTENT_TO_ADD: return Resource.Icons[theme].Added; 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; @@ -116,6 +117,7 @@ export class Resource implements SourceControlResourceState { case Status.INDEX_COPIED: return localize('index copied', "Index Copied"); case Status.UNTRACKED: return localize('untracked', "Untracked"); case Status.IGNORED: return localize('ignored', "Ignored"); + case Status.INTENT_TO_ADD: return localize('intent to add', "Intent to Add"); case Status.BOTH_DELETED: return localize('both deleted', "Both Deleted"); case Status.ADDED_BY_US: return localize('added by us', "Added By Us"); case Status.DELETED_BY_THEM: return localize('deleted by them', "Deleted By Them"); @@ -166,6 +168,7 @@ export class Resource implements SourceControlResourceState { case Status.MODIFIED: return 'M'; case Status.INDEX_ADDED: + case Status.INTENT_TO_ADD: return 'A'; case Status.INDEX_DELETED: case Status.DELETED: @@ -201,6 +204,7 @@ export class Resource implements SourceControlResourceState { case Status.DELETED: return new ThemeColor('gitDecoration.deletedResourceForeground'); case Status.INDEX_ADDED: + case Status.INTENT_TO_ADD: return new ThemeColor('gitDecoration.addedResourceForeground'); case Status.INDEX_RENAMED: // todo@joh - special color? case Status.UNTRACKED: @@ -1325,6 +1329,7 @@ export class Repository implements Disposable { switch (raw.y) { case 'M': workingTree.push(new Resource(ResourceGroupType.WorkingTree, uri, Status.MODIFIED, useIcons, renameUri)); break; case 'D': workingTree.push(new Resource(ResourceGroupType.WorkingTree, uri, Status.DELETED, useIcons, renameUri)); break; + case 'A': workingTree.push(new Resource(ResourceGroupType.WorkingTree, uri, Status.INTENT_TO_ADD, useIcons, renameUri)); break; } return undefined; });