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

@@ -115,9 +115,10 @@ export default class Git {
static async getVersionedFile(fileName: string, repoPath: string, sha: string) {
const data = await Git.getVersionedFileText(fileName, repoPath, sha);
const shortSha = sha.substring(0, 8);
const ext = path.extname(fileName);
return new Promise<string>((resolve, reject) => {
tmp.file({ prefix: `${path.basename(fileName, ext)}-${sha}__`, postfix: ext },
tmp.file({ prefix: `${path.basename(fileName, ext)}-${shortSha}__`, postfix: ext },
(err, destination, fd, cleanupCallback) => {
if (err) {
reject(err);