Skip to content

Commit

Permalink
git api: expose toGitUri
Browse files Browse the repository at this point in the history
  • Loading branch information
joaomoreno committed Nov 19, 2019
1 parent ff23412 commit b7ead23
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
5 changes: 5 additions & 0 deletions extensions/git/src/api/api1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { Repository as BaseRepository, Resource } from '../repository';
import { InputBox, Git, API, Repository, Remote, RepositoryState, Branch, Ref, Submodule, Commit, Change, RepositoryUIState, Status, LogOptions, APIState } from './git';
import { Event, SourceControlInputBox, Uri, SourceControl } from 'vscode';
import { mapEvent } from '../util';
import { toGitUri } from '../uri';

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

toGitUri(uri: Uri, ref: string): Uri {
return toGitUri(uri, ref);
}

constructor(private _model: Model) { }
}
2 changes: 2 additions & 0 deletions extensions/git/src/api/git.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,8 @@ export interface API {
readonly repositories: Repository[];
readonly onDidOpenRepository: Event<Repository>;
readonly onDidCloseRepository: Event<Repository>;

toGitUri(uri: Uri, ref: string): Uri;
}

export interface GitExtension {
Expand Down

0 comments on commit b7ead23

Please sign in to comment.