Path: blob/main/src/vs/workbench/contrib/chat/common/plugins/pluginGitService.ts
13405 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 { CancellationToken } from '../../../../../base/common/cancellation.js';6import { URI } from '../../../../../base/common/uri.js';7import { createDecorator } from '../../../../../platform/instantiation/common/instantiation.js';89export const IPluginGitService = createDecorator<IPluginGitService>('pluginGitService');1011/**12* Abstracts git operations used by the agent plugin system.13*14* Concrete behavior depends on the platform-specific implementation that is15* registered for this service.16*/17export interface IPluginGitService {18readonly _serviceBrand: undefined;1920cloneRepository(cloneUrl: string, targetDir: URI, ref?: string, token?: CancellationToken): Promise<void>;21pull(repoDir: URI, token?: CancellationToken): Promise<boolean>;22checkout(repoDir: URI, treeish: string, detached?: boolean, token?: CancellationToken): Promise<void>;23revParse(repoDir: URI, ref: string): Promise<string>;24fetch(repoDir: URI, token?: CancellationToken): Promise<void>;25fetchRepository(repoDir: URI, token?: CancellationToken): Promise<void>;26revListCount(repoDir: URI, fromRef: string, toRef: string): Promise<number>;27}282930