Removes unneeded shortSha parameter

This commit is contained in:
Eric Amodio
2017-09-11 00:36:38 -04:00
parent 260874fa1d
commit d420d82ab2
4 changed files with 11 additions and 11 deletions

View File

@@ -1061,15 +1061,17 @@ export class GitService extends Disposable {
return Git.normalizePath(fileName, repoPath);
}
static shortenSha(sha: string) {
static shortenSha(sha: string | undefined) {
if (sha === undefined) return undefined;
return Git.shortenSha(sha);
}
static toGitContentUri(sha: string, shortSha: string, fileName: string, repoPath: string, originalFileName?: string): Uri;
static toGitContentUri(sha: string, fileName: string, repoPath: string, originalFileName?: string): Uri;
static toGitContentUri(commit: GitCommit): Uri;
static toGitContentUri(uri: GitUri): Uri;
static toGitContentUri(shaOrcommitOrUri: string | GitCommit | GitUri, shortSha?: string, fileName?: string, repoPath?: string, originalFileName?: string): Uri {
static toGitContentUri(shaOrcommitOrUri: string | GitCommit | GitUri, fileName?: string, repoPath?: string, originalFileName?: string): Uri {
let data: IGitUriData;
let shortSha: string | undefined;
if (typeof shaOrcommitOrUri === 'string') {
data = GitService._toGitUriData({
sha: shaOrcommitOrUri,
@@ -1077,6 +1079,7 @@ export class GitService extends Disposable {
repoPath: repoPath!,
originalFileName: originalFileName
});
shortSha = GitService.shortenSha(shaOrcommitOrUri);
}
else if (shaOrcommitOrUri instanceof GitCommit) {
data = GitService._toGitUriData(shaOrcommitOrUri, undefined, shaOrcommitOrUri.originalFileName);