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