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

gitlog-parser fails on abbreviated commit hashes #48

Open
ribetm opened this issue Jul 15, 2022 · 0 comments
Open

gitlog-parser fails on abbreviated commit hashes #48

ribetm opened this issue Jul 15, 2022 · 0 comments

Comments

@ribetm
Copy link

ribetm commented Jul 15, 2022

Since gitlog-parser uses a simple parsing algorithm with slice slice(7, 47), it requires the hash to be exactly 40 char long (its default length).

Otherwise the git log output will be split incorrectly, causing this error

this._current.message += ('\n'+chunk);
                   ^
TypeError: Cannot read property 'message' of null

If hash abbreviation is enabled in git config, it will fail with the previous error. This can be fixed by calling git log with the abbrev option set to 40 (effectively disabling this configuration).

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

Successfully merging a pull request may close this issue.

1 participant