Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Commit message unavailable #38

Open
StewartAtkins opened this issue Apr 26, 2014 · 3 comments
Open

Commit message unavailable #38

StewartAtkins opened this issue Apr 26, 2014 · 3 comments

Comments

@StewartAtkins
Copy link

The vast majority of commit messages appear to have an empty string as commit message. This appears to be due to lib/commit.js:11-13 forcing _message to have a value and thus preventing the lazy load from obtaining the actual message.

@jankeromnes
Copy link
Collaborator

Hi @StewartAtkins, thanks for noticing this problem! Could you please suggest a fix in a pull request? I'd be happy to review it.

@scottnonnenberg
Copy link
Contributor

All of my one-line commit messages (beyond the subject line) appear empty, and multiline messages are missing the last line.

It seems to be due to this line - has that 'last line is empty' assumption ever been valid?

// Remove the last line which will be empty
for(var i = 0; i < (lines.length > 1 ? lines.length - 1 : lines.length); i++) {
  output = output + '    ' + lines[i] + '\n';
}

https://github.com/christkv/node-git/blob/master/lib/git/internal/git_commit.js#L70

@jankeromnes
Copy link
Collaborator

Nice catch, the assumption is probably invalid today, but thanks for staying on the safe side in your commit!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants