New Features
- add
commit::ExtraHeaders::find_pos()
, and expose "gpgsig" header name.
That way it it's easier to manipulate existing extra-header fields. - add
CommitRef|TagRef|BlobRef::into_owned()
as shortcut.
Otherwise one would have to know it converts intoCommit
viaFrom
.
Bug Fixes
-
Support empty tags with or without trailing NL
When representing an annotated tag with an empty commit message, we used
to only support a tag ending with two newlines (one after the tagger
line + one after the empty commit message).This was due to a misconception that annotated tags ending with a single
NL shouldn't exist in the wild since there isn't an obvious way to
create them from withgit
.
This misconception shows up in the discussion thread for
issue 603It turns out that both encodings of empty annotated tags appear in the
wild.We must be able to parse either and roundtrip for either.
Before PR 604, we
used to special case the empty tag msg case and not add a NL.
To be able to representb""
,b"\n"
,b"\n\n"
..., we special case
anymessage
that is a pure sequence ofb'\n'
and actually parse the
b'\n'
into the tag's message.This allows us to calculate the correct size that matches the number of
bytes that git would produce, as well as round-trip to and from the
commit encoding.The existing tests (in particular
round_trip
forempty.txt
and
empty_missing_nl.txt
) convince me that the logic is sound.
Also, the size being139
bytes forempty_missing_nl.txt
and140
bytes forempty.txt
matches the output ofcat file | wc -l
for each
file.
Other
-
Repository::commit()
now explains how to create a commit without ref updates.
Changed (BREAKING)
- drop migration shims for fallible hashing
Since the APIs were already adjusted and all callers migrated, we
only need to drop the migration shims. - make
gix_object::compute_hash
fallible
compute_stream_hash
is already fallible, so we don’t want to keep
thetry_*
prefix on the fallible API. - adjust error return types to handle collision detection
This does mean a lot of churn across the tree, but the change is
usually just an adjustment to variants of an existing error type,
so I expect that most downstream users will require little to no
adaption for this change. - use separate error type for I/O hashing operations
Prepare for hashing becoming fallible. - adjust hash verification return types for the common interface
This mostly just affects return types – using
git_hash::verify::Error
instead of bespoke duplicated versions
thereof, and occasionally returning anObjectId
instead of()
for convenience.
Commit Statistics
- 33 commits contributed to the release.
- 9 commits were understood as conventional.
- 0 issues like '(#ID)' were seen in commit messages
Thanks Clippy
Clippy helped 1 time to make code idiomatic.
Commit Details
view details
- Uncategorized
- Update changelogs prior to release (38dff41)
- Merge pull request #1915 from emilazy/push-qvyqmopsoltr (4660f7a)
- Refactor (4501086)
- Drop migration shims for fallible hashing (a68f115)
- Migrate
gix_object::{try_ =>}compute_hash
users (3d7e379) - Make
gix_object::compute_hash
fallible (b5ac93a) - Migrate hashing API users to fallible versions (fbf6cc8)
- Add fallible
gix_object::try_compute_hash
for migration (f2b07c0) - Adjust error return types to handle collision detection (5095f44)
- Use separate error type for I/O hashing operations (4f2b649)
- Adjust hash verification return types for the common interface (54e5764)
- Migrate all hashing API users to
gix_hash::Hasher::finalize()
(4e935ce) - Migrate all hashing API users to
gix_hash
(baa1430) - Use
gix_object::compute_hash
in a test and benchmark (7805ffe) - Factor out private
gix_object::object_hasher
helper (cf261d5) - Merge pull request #1908 from EliahKagan/run-ci/scripts (c8c42b4)
- Fix a few ShellCheck warnings and stylistic inconsistencies (e5e2c6f)
- Merge pull request #1907 from EliahKagan/run-ci/raw (7b17da6)
- Use raw literals for more strings with backslashes (01bd76d)
- Merge pull request #1903 from pierrechevalier83/tag_end_of_line (6caee49)
- Support empty tags with or without trailing NL (f69890c)
- Merge pull request #1854 from GitoxideLabs/montly-report (16a248b)
- Thanks clippy (8e96ed3)
- Merge pull request #1837 from GitoxideLabs/improvements (b4fe425)
- Add
commit::ExtraHeaders::find_pos()
, and expose "gpgsig" header name. (bf85128) Repository::commit()
now explains how to create a commit without ref updates. (866affd)- Add
CommitRef|TagRef|BlobRef::into_owned()
as shortcut. (527fd3d) - Merge pull request #1822 from epage/w7 (11ac79c)
- Upgrade to Winnow 0.7 (fdc57e7)
- Switch to ModalParser (0e71412)
- Resolve Winnow deprecations (3cd3e2a)
- Upgrade to Winnow 0.6.26 (783c4e6)
- Merge pull request #1778 from GitoxideLabs/new-release (8df0db2)