Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
microsoft
GitHub Repository: microsoft/vscode
Path: blob/main/src/vs/platform/git/common/localGitService.ts
13394 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 { createDecorator } from '../../instantiation/common/instantiation.js';
7
8
export const ILocalGitService = createDecorator<ILocalGitService>('localGitService');
9
10
/**
11
* Low-level service for executing git commands on the local machine.
12
* Used in the shared process where Node.js APIs are available.
13
* All path arguments are native file-system paths.
14
*/
15
export interface ILocalGitService {
16
readonly _serviceBrand: undefined;
17
18
clone(operationId: string, cloneUrl: string, targetPath: string, ref?: string): Promise<void>;
19
pull(operationId: string, repoPath: string): Promise<boolean>;
20
checkout(operationId: string, repoPath: string, treeish: string, detached?: boolean): Promise<void>;
21
revParse(repoPath: string, ref: string): Promise<string>;
22
fetch(operationId: string, repoPath: string): Promise<void>;
23
revListCount(repoPath: string, fromRef: string, toRef: string): Promise<number>;
24
cancel(operationId: string): Promise<void>;
25
}
26
27