Skip to content

chore: update gix to 0.73 #579

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

blinxen
Copy link
Contributor

@blinxen blinxen commented Jul 20, 2025

This PR tries to update gix to version 0.73.

The changes were needed because of:

  • SignatureRef.time method now returns a &str. There is a SignatureRef.time() to get Time back. This can however fail and return an Error. I replaced all instances where time was accessed directly with time()?. In one case, I couldn't use the ? operator because the method did not return a Result. How do you want this to be handled? Is there some default value that can be used here? The compile error looks like this:
> cargo b
   Compiling stgit v2.5.3 (/home/hka/dev/opensource/stgit)
error[E0308]: mismatched types
  --> src/ext/signature.rs:49:24
   |
49 |             .unwrap_or(self.time);
   |              --------- ^^^^^^^^^ expected `Time`, found `&str`
   |              |
   |              arguments to this method are incorrect
   |
help: the return type of this call is `&str` due to the type of the argument passed
  --> src/ext/signature.rs:46:20
   |
46 |           let time = matches
   |  ____________________^
47 | |             .get_one::<gix::date::Time>("authdate")
48 | |             .copied()
49 | |             .unwrap_or(self.time);
   | |________________________---------^
   |                          |
   |                          this argument influences the return type of `unwrap_or`
note: method defined here
  --> /builddir/build/BUILD/rust-1.88.0-build/rustc-1.88.0-src/library/core/src/option.rs:1023:12
  • SignatureRef.to_owned() can now fail and needs to handled accordingly (by using the ? operator).
  • RepositoryExtended.commit_ex() wants a SignatureRef but Signature was passed. I assume that because of the updated somewhere Signature is returned instead of SignatureRef. I added a couple of Signature.to_ref calls where needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant