mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-22 01:29:04 +01:00
git api: remotes
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
|
||||
import { Model } from '../model';
|
||||
import { Repository as BaseRepository } from '../repository';
|
||||
import { InputBox, Git, API, Repository } from './git';
|
||||
import { InputBox, Git, API, Repository, Remote } from './git';
|
||||
import { Event, SourceControlInputBox, Uri } from 'vscode';
|
||||
import { mapEvent } from '../util';
|
||||
|
||||
@@ -21,11 +21,11 @@ export class ApiRepository implements Repository {
|
||||
|
||||
readonly rootUri: Uri = Uri.file(this._repository.root);
|
||||
readonly inputBox: InputBox = new ApiInputBox(this._repository.inputBox);
|
||||
get remotes(): Remote[] { return [...this._repository.remotes]; }
|
||||
|
||||
readonly onDidRunGitStatus: Event<void> = this._repository.onDidRunGitStatus;
|
||||
|
||||
constructor(private _repository: BaseRepository) {
|
||||
}
|
||||
constructor(private _repository: BaseRepository) { }
|
||||
|
||||
status(): Promise<void> {
|
||||
return this._repository.status();
|
||||
|
||||
8
extensions/git/src/api/git.d.ts
vendored
8
extensions/git/src/api/git.d.ts
vendored
@@ -14,9 +14,17 @@ export interface InputBox {
|
||||
value: string;
|
||||
}
|
||||
|
||||
export interface Remote {
|
||||
readonly name: string;
|
||||
readonly fetchUrl?: string;
|
||||
readonly pushUrl?: string;
|
||||
readonly isReadOnly: boolean;
|
||||
}
|
||||
|
||||
export interface Repository {
|
||||
readonly rootUri: Uri;
|
||||
readonly inputBox: InputBox;
|
||||
readonly remotes: Remote[];
|
||||
|
||||
readonly onDidRunGitStatus: Event<void>;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user