-
-
Notifications
You must be signed in to change notification settings - Fork 353
fix: Make email with spaces round-trip #1922
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: Make email with spaces round-trip #1922
Conversation
We see this situation in commits in the wild.
Stop trimming the email at parsing time. We see poorly formatted emails with a space at the end in real Git repos and we wish for the gitoxide representation for such commits to roundtrip. Propagate the fix from `gix-actor` and add a test to show we now roundtrip.
6781235
to
ce6c75d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot, much appreciated!
Note that I fixed the subject, and decided that the first commit isn't a breaking change as the API doesn't break. Further, I added documentation that makes clear that spaces can be included in the email.
Lastly, I brought back an assertions that was made as part of another fix.
ce6c75d
to
39e35a3
Compare
Summary: ignore-conflict-markers Upgrade gitoxide crates to latest release to propagate some upstream fixes: * [[gix-object] Support empty tags with or without trailing NL](GitoxideLabs/gitoxide#1903) * [[fix] Make Tree roundtrip by storing additional bit of information](GitoxideLabs/gitoxide#1917) * [fix: Make email with spaces round-trip](GitoxideLabs/gitoxide#1922) * [Make author and committer date roundtrip](GitoxideLabs/gitoxide#1935) Reviewed By: quark-zju Differential Revision: D74337531 fbshipit-source-id: 5361c7d4b0b52c683e05af8d19ac2169aebc8197
Summary: ignore-conflict-markers Upgrade gitoxide crates to latest release to propagate some upstream fixes: * [[gix-object] Support empty tags with or without trailing NL](GitoxideLabs/gitoxide#1903) * [[fix] Make Tree roundtrip by storing additional bit of information](GitoxideLabs/gitoxide#1917) * [fix: Make email with spaces round-trip](GitoxideLabs/gitoxide#1922) * [Make author and committer date roundtrip](GitoxideLabs/gitoxide#1935) Reviewed By: quark-zju Differential Revision: D74337531 fbshipit-source-id: 5361c7d4b0b52c683e05af8d19ac2169aebc8197
Summary: ignore-conflict-markers Upgrade gitoxide crates to latest release to propagate some upstream fixes: * [[gix-object] Support empty tags with or without trailing NL](GitoxideLabs/gitoxide#1903) * [[fix] Make Tree roundtrip by storing additional bit of information](GitoxideLabs/gitoxide#1917) * [fix: Make email with spaces round-trip](GitoxideLabs/gitoxide#1922) * [Make author and committer date roundtrip](GitoxideLabs/gitoxide#1935) Reviewed By: quark-zju Differential Revision: D74337531 fbshipit-source-id: 5361c7d4b0b52c683e05af8d19ac2169aebc8197
Summary: ignore-conflict-markers Upgrade gitoxide crates to latest release to propagate some upstream fixes: * [[gix-object] Support empty tags with or without trailing NL](GitoxideLabs/gitoxide#1903) * [[fix] Make Tree roundtrip by storing additional bit of information](GitoxideLabs/gitoxide#1917) * [fix: Make email with spaces round-trip](GitoxideLabs/gitoxide#1922) * [Make author and committer date roundtrip](GitoxideLabs/gitoxide#1935) Reviewed By: quark-zju Differential Revision: D74337531 fbshipit-source-id: 5361c7d4b0b52c683e05af8d19ac2169aebc8197
Summary: ignore-conflict-markers Upgrade gitoxide crates to latest release to propagate some upstream fixes: * [[gix-object] Support empty tags with or without trailing NL](GitoxideLabs/gitoxide#1903) * [[fix] Make Tree roundtrip by storing additional bit of information](GitoxideLabs/gitoxide#1917) * [fix: Make email with spaces round-trip](GitoxideLabs/gitoxide#1922) * [Make author and committer date roundtrip](GitoxideLabs/gitoxide#1935) Reviewed By: quark-zju Differential Revision: D74337531 fbshipit-source-id: 5361c7d4b0b52c683e05af8d19ac2169aebc8197
Summary: ignore-conflict-markers Upgrade gitoxide crates to latest release to propagate some upstream fixes: * [[gix-object] Support empty tags with or without trailing NL](GitoxideLabs/gitoxide#1903) * [[fix] Make Tree roundtrip by storing additional bit of information](GitoxideLabs/gitoxide#1917) * [fix: Make email with spaces round-trip](GitoxideLabs/gitoxide#1922) * [Make author and committer date roundtrip](GitoxideLabs/gitoxide#1935) Reviewed By: quark-zju Differential Revision: D74337531 fbshipit-source-id: 5361c7d4b0b52c683e05af8d19ac2169aebc8197
Summary: ignore-conflict-markers Upgrade gitoxide crates to latest release to propagate some upstream fixes: * [[gix-object] Support empty tags with or without trailing NL](GitoxideLabs/gitoxide#1903) * [[fix] Make Tree roundtrip by storing additional bit of information](GitoxideLabs/gitoxide#1917) * [fix: Make email with spaces round-trip](GitoxideLabs/gitoxide#1922) * [Make author and committer date roundtrip](GitoxideLabs/gitoxide#1935) Reviewed By: quark-zju Differential Revision: D74337531 fbshipit-source-id: 5361c7d4b0b52c683e05af8d19ac2169aebc8197
Summary: ignore-conflict-markers Upgrade gitoxide crates to latest release to propagate some upstream fixes: * [[gix-object] Support empty tags with or without trailing NL](GitoxideLabs/gitoxide#1903) * [[fix] Make Tree roundtrip by storing additional bit of information](GitoxideLabs/gitoxide#1917) * [fix: Make email with spaces round-trip](GitoxideLabs/gitoxide#1922) * [Make author and committer date roundtrip](GitoxideLabs/gitoxide#1935) Reviewed By: quark-zju Differential Revision: D74337531 fbshipit-source-id: 5361c7d4b0b52c683e05af8d19ac2169aebc8197
Before this change, a commit containing
"<email@provider.com >"
looses the final space when round-tripping, changing the size of the gix-object and it hash.This was due to the spaces getting trimmed at parse time.
Fix it and show a few examples with tests that now round-trip as expected.