From 7b6e41c43ab0dc3727a4e91f52d474025dc933cf Mon Sep 17 00:00:00 2001 From: oleg Date: Tue, 14 Jul 2015 00:30:40 +0300 Subject: [PATCH] use short commit hash for git --- lib/scm/git.js | 2 +- test/helpers.js | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/scm/git.js b/lib/scm/git.js index ca3e965..3c76dd3 100644 --- a/lib/scm/git.js +++ b/lib/scm/git.js @@ -20,7 +20,7 @@ Scm.prototype._fieldsSeparator = String.fromCharCode(2063); Scm.prototype._fieldsSeparator += Scm.prototype._fieldsSeparator; Scm.prototype._revTemplate = [ - '%H', '%cn', '%cd', '%s', '%d' + '%h', '%cn', '%cd', '%s', '%d' ].join(Scm.prototype._fieldsSeparator); Scm.prototype._parseRev = function(str) { diff --git a/test/helpers.js b/test/helpers.js index 1c0ed27..8e68fcb 100644 --- a/test/helpers.js +++ b/test/helpers.js @@ -45,18 +45,18 @@ exports.mercurialRevs = [{ }]; exports.gitRevs = [{ - id: '4ec4643d2044871177d758b3b0e7962b5c4f40d1', + id: '4ec4643', tags: ['zero'], author: 'oleg', date: new Date('Mon Jul 13 22:30:58 2015 +0300').getTime(), comment: 'zero revision' }, { - id: 'f76bae67efc6fd5a43392517646bb9d685f4266f', + id: 'f76bae6', author: 'oleg', date: new Date('Mon Jul 13 22:31:58 2015 +0300').getTime(), comment: 'first revision' }, { - id: '39245d9b93bcd2a0c6708d483b83c98a7bff1d3e', + id: '39245d9', tags: ['release-0.1.0', 'second-revision'], author: 'oleg', date: new Date('Mon Jul 13 22:32:59 2015 +0300').getTime(),