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