Fix wrong reading from commit

Right now we use a substr after reading the commit. That's definitely
wrong and leads to wrong commit hashes since the first 5 chars are
missing.

This patch removes the substr usage here and this way fixes the
generated links.

Signed-off-by: Sheogorath <sheogorath@shivering-isles.com>
This commit is contained in:
Sheogorath 2018-11-12 11:17:36 +01:00
parent bcc914a773
commit 4b0528ac4f
No known key found for this signature in database
GPG key ID: 1F05CC3635CDDFFD

View file

@ -33,7 +33,7 @@ exports.getGitCommit = function getGitCommit (repodir) {
reference = reference.substr(5).replace('\n', '') reference = reference.substr(5).replace('\n', '')
reference = fs.readFileSync(path.resolve(repodir + '/.git', reference), 'utf8') reference = fs.readFileSync(path.resolve(repodir + '/.git', reference), 'utf8')
} }
reference = reference.substr(5).replace('\n', '') reference = reference.replace('\n', '')
return reference return reference
} }