Skip to content

Commit

Permalink
Fix dynamic commit hash abbreviation length (#272)
Browse files Browse the repository at this point in the history
  • Loading branch information
oligot authored and sindresorhus committed Jun 2, 2018
1 parent e9ccead commit f291eff
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/ui.js
Expand Up @@ -38,9 +38,9 @@ function printCommitLog(repositoryUrl) {

const history = result.split('\n')
.map(commit => {
const commitParts = commit.match(/^(.+)\s([a-f\d]{7})$/);
const commitMessage = util.linkifyIssues(repositoryUrl, commitParts[1]);
const commitId = util.linkifyCommit(repositoryUrl, commitParts[2]);
const splitIndex = commit.lastIndexOf(' ');
const commitMessage = util.linkifyIssues(repositoryUrl, commit.substring(0, splitIndex));
const commitId = util.linkifyCommit(repositoryUrl, commit.substring(splitIndex + 1));

return `- ${commitMessage} ${commitId}`;
})
Expand Down

0 comments on commit f291eff

Please sign in to comment.