Adds shortenSha method

This commit is contained in:
Eric Amodio
2017-09-09 00:43:20 -04:00
parent f05d236e79
commit df0599a832
10 changed files with 24 additions and 15 deletions

View File

@@ -51,7 +51,7 @@ export class GitCommit {
}
get shortSha() {
return this.sha.substring(0, 8);
return Git.shortenSha(this.sha);
}
get isUncommitted(): boolean {
@@ -62,7 +62,7 @@ export class GitCommit {
}
get previousShortSha() {
return this.previousSha && this.previousSha.substring(0, 8);
return this.previousSha && Git.shortenSha(this.previousSha);
}
get previousUri(): Uri {

View File

@@ -1,6 +1,7 @@
'use strict';
import { Uri } from 'vscode';
import { GitCommit, GitCommitType } from './commit';
import { Git } from '../git';
import { GitStatusFileStatus, IGitStatusFile } from './status';
import * as path from 'path';
@@ -49,7 +50,7 @@ export class GitLogCommit extends GitCommit {
}
get nextShortSha() {
return this.nextSha && this.nextSha.substring(0, 8);
return this.nextSha && Git.shortenSha(this.nextSha);
}
get nextUri(): Uri {