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

Git log for merge / empty commits does not work correctly #1270

Closed
campersau opened this issue Feb 2, 2020 · 2 comments · Fixed by #1271
Closed

Git log for merge / empty commits does not work correctly #1270

campersau opened this issue Feb 2, 2020 · 2 comments · Fixed by #1271

Comments

@campersau
Copy link
Collaborator

Based on #1262 (comment) I have found issues in the updated git parser from #1262 where merge / empty commits are no longer parsed correctly.


Merge commits with multiline text were outputed like this before:

commit 621a04f931ea9007ac826c04a1a02832e20aa470
Merge: 4e5d611f e2dc3ef6
Author: campersau <>
Date:   Wed Jan 29 12:07:38 2020 +0100

    Merge pull request #1268 from campersau/prepare_152

    Prepare version 1.5.2

4       1       CHANGELOG.md
1       1       package-lock.json
1       1       package.json
8       6       source/git-parser.js

commit e2dc3ef6e2cbf6ab0acb456c0837257dc01baafd

But with the -z option they are outputed as:

commit 621a04f931ea9007ac826c04a1a02832e20aa470
Merge: 4e5d611f e2dc3ef6
Author: campersau <>
Date:   Wed Jan 29 12:07:38 2020 +0100

    Merge pull request #1268 from campersau/prepare_152

    Prepare version 1.5.2
\x004     1       CHANGELOG.md\x001 1       package-lock.json\x001    1       package.json\x008 6       source/git-parser.js\x00\x00commit e2dc3ef6e2cbf6ab0acb456c0837257dc01baafd

The problem here is that there is no new line after the commit message.


Empty commits with multiline text were outputed like this before:

commit 868962b341b31bd2d06035e5b365b0a50d2f9278
Author: campersau <>
Date:   Sun Feb 2 17:56:36 2020 +0100

    empty commit

    message content

commit 2a583a26dd8cee2f9569ae0320b5681e23afc02e

But with the -z option they are outputed as:

commit 868962b341b31bd2d06035e5b365b0a50d2f9278
Author: campersau <>
Date:   Sun Feb 2 17:56:36 2020 +0100

    empty commit

    message content
\x00commit 2a583a26dd8cee2f9569ae0320b5681e23afc02e

The problem here is that there is no new line after the commit message and also the next line starts with \x00commit instead of commit.

@campersau
Copy link
Collaborator Author

cc @ylecuyer

@ylecuyer
Copy link
Contributor

ylecuyer commented Feb 2, 2020

Thanks @campersau for handling this. I wasn't able to do so as I am on my way back from FOSDEM.

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.

2 participants