fix: Make email with spaces round-trip#1922
Merged
Sebastian Thiel (Byron) merged 4 commits intoApr 5, 2025
Merged
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.
Sebastian Thiel (Byron)
force-pushed
the
make_email_with_spaces_roundtrip
branch
from
April 5, 2025 02:48
6781235 to
ce6c75d
Compare
Sebastian Thiel (Byron)
approved these changes
Apr 5, 2025
Sebastian Thiel (Byron)
left a comment
Member
There was a problem hiding this comment.
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.
Sebastian Thiel (Byron)
force-pushed
the
make_email_with_spaces_roundtrip
branch
from
April 5, 2025 02:53
ce6c75d to
39e35a3
Compare
Sebastian Thiel (Byron)
enabled auto-merge
April 5, 2025 02:53
Facebook Community Bot (facebook-github-bot)
pushed a commit
to facebook/dotslash
that referenced
this pull request
May 16, 2025
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
Facebook Community Bot (facebook-github-bot)
pushed a commit
to facebookincubator/below
that referenced
this pull request
May 16, 2025
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
Facebook Community Bot (facebook-github-bot)
pushed a commit
to facebookexperimental/rust-shed
that referenced
this pull request
May 16, 2025
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
Facebook Community Bot (facebook-github-bot)
pushed a commit
to facebookexperimental/reverie
that referenced
this pull request
May 16, 2025
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
Facebook Community Bot (facebook-github-bot)
pushed a commit
to facebook/sapling
that referenced
this pull request
May 16, 2025
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
Facebook Community Bot (facebook-github-bot)
pushed a commit
to facebookincubator/reindeer
that referenced
this pull request
May 16, 2025
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
Facebook Community Bot (facebook-github-bot)
pushed a commit
to facebookexperimental/hermit
that referenced
this pull request
May 16, 2025
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
Facebook Community Bot (facebook-github-bot)
pushed a commit
to facebook/hhvm
that referenced
this pull request
May 16, 2025
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Before this change, a commit containing
"<[email protected] >"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.