-
-
Notifications
You must be signed in to change notification settings - Fork 407
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
Fix empty message serialization #1441
Conversation
@jelmer I've made this a draft, because the change still seems terrifying to me. I haven't read and understood enough of the code to feel great about this change. I'm planning to read and understand some more of the code. What do you think? You see any issues? An addition improvement to consider is to strongly type the |
95c545d
to
95b2474
Compare
* Fixes incorrect signature verification for commits with an empty message, as encoded by CGit (jelmer#1429)
95b2474
to
6289902
Compare
This looks correct to me; if you create a commit with an empty commit message in C git, you still end up with two newlines after the last header. |
Reading the code, I'm seeing that this change is affecting a code path when a tag lacks a non-empty message and lacks a signature. So this code change is also going to cause an extra newline in a tag corner case. I'm going peek at some more unit tests to see if they can help confirm that a new newline is appropriate in the tag case. |
Doing |
OK, i've looked over the code/tests, looked at |
Thanks for the careful checking! |
Fixes #1429, incorrect signature verification for commits with an empty message, as encoded by CGit.