Path: blob/main/extensions/git/src/api/git.constants.ts
13389 views
/*---------------------------------------------------------------------------------------------1* Copyright (c) Microsoft Corporation. All rights reserved.2* Licensed under the MIT License. See License.txt in the project root for license information.3*--------------------------------------------------------------------------------------------*/45import type * as git from './git';67export type ForcePushMode = git.ForcePushMode;8export type RefType = git.RefType;9export type Status = git.Status;10export type GitErrorCodes = git.GitErrorCodes;1112export const ForcePushMode = Object.freeze({13Force: 0,14ForceWithLease: 1,15ForceWithLeaseIfIncludes: 2,16}) satisfies typeof git.ForcePushMode;1718export const RefType = Object.freeze({19Head: 0,20RemoteHead: 1,21Tag: 2,22}) satisfies typeof git.RefType;2324export const Status = Object.freeze({25INDEX_MODIFIED: 0,26INDEX_ADDED: 1,27INDEX_DELETED: 2,28INDEX_RENAMED: 3,29INDEX_COPIED: 4,3031MODIFIED: 5,32DELETED: 6,33UNTRACKED: 7,34IGNORED: 8,35INTENT_TO_ADD: 9,36INTENT_TO_RENAME: 10,37TYPE_CHANGED: 11,3839ADDED_BY_US: 12,40ADDED_BY_THEM: 13,41DELETED_BY_US: 14,42DELETED_BY_THEM: 15,43BOTH_ADDED: 16,44BOTH_DELETED: 17,45BOTH_MODIFIED: 18,46}) satisfies typeof git.Status;4748export const GitErrorCodes = Object.freeze({49BadConfigFile: 'BadConfigFile',50BadRevision: 'BadRevision',51AuthenticationFailed: 'AuthenticationFailed',52NoUserNameConfigured: 'NoUserNameConfigured',53NoUserEmailConfigured: 'NoUserEmailConfigured',54NoRemoteRepositorySpecified: 'NoRemoteRepositorySpecified',55NotAGitRepository: 'NotAGitRepository',56NotASafeGitRepository: 'NotASafeGitRepository',57NotAtRepositoryRoot: 'NotAtRepositoryRoot',58Conflict: 'Conflict',59StashConflict: 'StashConflict',60UnmergedChanges: 'UnmergedChanges',61PushRejected: 'PushRejected',62ForcePushWithLeaseRejected: 'ForcePushWithLeaseRejected',63ForcePushWithLeaseIfIncludesRejected: 'ForcePushWithLeaseIfIncludesRejected',64RemoteConnectionError: 'RemoteConnectionError',65DirtyWorkTree: 'DirtyWorkTree',66CantOpenResource: 'CantOpenResource',67GitNotFound: 'GitNotFound',68CantCreatePipe: 'CantCreatePipe',69PermissionDenied: 'PermissionDenied',70CantAccessRemote: 'CantAccessRemote',71RepositoryNotFound: 'RepositoryNotFound',72RepositoryIsLocked: 'RepositoryIsLocked',73BranchNotFullyMerged: 'BranchNotFullyMerged',74NoRemoteReference: 'NoRemoteReference',75InvalidBranchName: 'InvalidBranchName',76BranchAlreadyExists: 'BranchAlreadyExists',77NoLocalChanges: 'NoLocalChanges',78NoStashFound: 'NoStashFound',79LocalChangesOverwritten: 'LocalChangesOverwritten',80NoUpstreamBranch: 'NoUpstreamBranch',81IsInSubmodule: 'IsInSubmodule',82WrongCase: 'WrongCase',83CantLockRef: 'CantLockRef',84CantRebaseMultipleBranches: 'CantRebaseMultipleBranches',85PatchDoesNotApply: 'PatchDoesNotApply',86NoPathFound: 'NoPathFound',87UnknownPath: 'UnknownPath',88EmptyCommitMessage: 'EmptyCommitMessage',89BranchFastForwardRejected: 'BranchFastForwardRejected',90BranchNotYetBorn: 'BranchNotYetBorn',91TagConflict: 'TagConflict',92CherryPickEmpty: 'CherryPickEmpty',93CherryPickConflict: 'CherryPickConflict',94WorktreeContainsChanges: 'WorktreeContainsChanges',95WorktreeAlreadyExists: 'WorktreeAlreadyExists',96WorktreeBranchAlreadyUsed: 'WorktreeBranchAlreadyUsed',97}) satisfies Record<keyof typeof git.GitErrorCodes, string>;9899100