Skip to content

Commit b7ead23

Browse files
committed
git api: expose toGitUri
1 parent ff23412 commit b7ead23

2 files changed

Lines changed: 7 additions & 0 deletions

File tree

extensions/git/src/api/api1.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import { Repository as BaseRepository, Resource } from '../repository';
88
import { InputBox, Git, API, Repository, Remote, RepositoryState, Branch, Ref, Submodule, Commit, Change, RepositoryUIState, Status, LogOptions, APIState } from './git';
99
import { Event, SourceControlInputBox, Uri, SourceControl } from 'vscode';
1010
import { mapEvent } from '../util';
11+
import { toGitUri } from '../uri';
1112

1213
class ApiInputBox implements InputBox {
1314
set value(value: string) { this._inputBox.value = value; }
@@ -234,5 +235,9 @@ export class ApiImpl implements API {
234235
return this._model.repositories.map(r => new ApiRepository(r));
235236
}
236237

238+
toGitUri(uri: Uri, ref: string): Uri {
239+
return toGitUri(uri, ref);
240+
}
241+
237242
constructor(private _model: Model) { }
238243
}

extensions/git/src/api/git.d.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,8 @@ export interface API {
185185
readonly repositories: Repository[];
186186
readonly onDidOpenRepository: Event<Repository>;
187187
readonly onDidCloseRepository: Event<Repository>;
188+
189+
toGitUri(uri: Uri, ref: string): Uri;
188190
}
189191

190192
export interface GitExtension {

0 commit comments

Comments
 (0)