Skip to content

Commit

Permalink
fix(err): remove an extra error sentence
Browse files Browse the repository at this point in the history
  • Loading branch information
stevemao committed Feb 21, 2015
1 parent 064997d commit 2fd3252
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/git.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ function parseRawCommit(raw) {
function getCommits(options, done) {
getLatestTag(function(err, latestTag) {
if (err || latestTag === undefined) {
return done('Failed to read git tags.\n' + err);
return done(err);
}

options = extend({
Expand Down

2 comments on commit 2fd3252

@ajoslin
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is actually a potentially breaking change if someone is using our library and expecting the error to say 'Failed to read git tags.'

We should add a BREAKING CHANGE: footer to this commit.

@stevemao
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh because I moved more git logics from index.js to lib/git.js, the error would be

'Failed to read git log.\n' + 'Failed to read git tags.\n' + error so it looks weird.

instead of just 'Failed to read git tags.\n' + error`

I thought it was good to just have 'Failed to read git log.\n + error even if it's beause 'Failed to read git log.\n' + error

Now I think it's probably ok to have 'Failed to read git log.\n' + 'Failed to read git tags.\n' + error

Please sign in to comment.