Port to gix 0.86 - #648
Open
tsimonq2 wants to merge 1 commit into
Open
Conversation
Bump the gix crate from 0.84 to 0.86 and update call sites for the
gix-config 0.59 API that gix 0.86 re-exports. A version-only bump does
not compile.
gix::config::File no longer takes a lifetime, so File<'static> and
CommitOptions<'_> lose that parameter. Snapshot::string() now returns
Option<BString> rather than Option<Cow<BStr>>, so CommitOptions stores
BString and for_label() takes s.as_ref().
Snapshot::string_by and boolean_by are gone. Look up dotted keys with
string() / boolean() / try_boolean(), which stgit already uses for
keys such as branch.{name}.remote. try_boolean() is Result<Option<bool>>
rather than Option<Result<bool>>, so drop the extra transpose() on the
autostash lookups.
SectionRef::num_values() moved to BodyRef (section.body().num_values()).
value_names() yields String rather than BStr, so skip to_str() and pass
the name through to value(). File::rename_section's new subsection is
IntoBStringOpt (Option<BString>), not Option<Cow<BStr>>.
Snapshot::trusted_path returns Result<Option<PathBuf>, _> instead of an
Option that needs transpose(). Hook path construction can use PathBuf
directly; editor lookup maps PathBuf with into_os_string().
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.
Bump the gix crate from 0.84 to 0.86 and update call sites for the gix-config 0.59 API that gix 0.86 re-exports. A version-only bump does not compile.
gix::config::File no longer takes a lifetime, so File<'static> and CommitOptions<'_> lose that parameter. Snapshot::string() now returns Option rather than Option<Cow>, so CommitOptions stores BString and for_label() takes s.as_ref().
Snapshot::string_by and boolean_by are gone. Look up dotted keys with string() / boolean() / try_boolean(), which stgit already uses for keys such as branch.{name}.remote. try_boolean() is Result<Option> rather than Option<Result>, so drop the extra transpose() on the autostash lookups.
SectionRef::num_values() moved to BodyRef (section.body().num_values()). value_names() yields String rather than BStr, so skip to_str() and pass the name through to value(). File::rename_section's new subsection is IntoBStringOpt (Option), not Option<Cow>.
Snapshot::trusted_path returns Result<Option, _> instead of an Option that needs transpose(). Hook path construction can use PathBuf directly; editor lookup maps PathBuf with into_os_string().