Switches everything to use full shas

This commit is contained in:
Eric Amodio
2017-03-10 22:26:48 -05:00
parent df838e883a
commit 762fa545c7
20 changed files with 60 additions and 37 deletions

View File

@@ -80,6 +80,10 @@ export class GitCommit implements IGitCommit {
this.previousFileName = previousFileName;
}
get shortSha() {
return this.sha.substring(0, 8);
}
get isUncommitted(): boolean {
if (this._isUncommitted === undefined) {
this._isUncommitted = Git.isUncommitted(this.sha);
@@ -87,6 +91,10 @@ export class GitCommit implements IGitCommit {
return this._isUncommitted;
}
get previousShortSha() {
return this.previousSha && this.previousSha.substring(0, 8);
}
get previousUri(): Uri {
return this.previousFileName ? Uri.file(path.join(this.repoPath, this.previousFileName)) : this.uri;
}
@@ -138,6 +146,10 @@ export class GitLogCommit extends GitCommit {
}
}
get nextShortSha() {
return this.nextSha && this.nextSha.substring(0, 8);
}
get nextUri(): Uri {
return this.nextFileName ? Uri.file(path.join(this.repoPath, this.nextFileName)) : this.uri;
}