Skip to content

Commit 5b1f6d1

Browse files
committed
git_backend: make signature_to_git return gix::actor::Signature
This is in preparation for updating `gix` in the following commit, which changes the `gix::actor::SignatureRef` API significantly and in a way that would be awkward for this function to support.
1 parent b16bed1 commit 5b1f6d1

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lib/src/git_backend.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -664,7 +664,7 @@ fn signature_from_git(signature: gix::actor::SignatureRef) -> Signature {
664664
}
665665
}
666666

667-
fn signature_to_git(signature: &Signature) -> gix::actor::SignatureRef<'_> {
667+
fn signature_to_git(signature: &Signature) -> gix::actor::Signature {
668668
// git does not support empty names or emails
669669
let name = if !signature.name.is_empty() {
670670
&signature.name
@@ -680,7 +680,7 @@ fn signature_to_git(signature: &Signature) -> gix::actor::SignatureRef<'_> {
680680
signature.timestamp.timestamp.0.div_euclid(1000),
681681
signature.timestamp.tz_offset * 60, // in seconds
682682
);
683-
gix::actor::SignatureRef {
683+
gix::actor::Signature {
684684
name: name.into(),
685685
email: email.into(),
686686
time,
@@ -1307,8 +1307,8 @@ impl Backend for GitBackend {
13071307
let mut commit = gix::objs::Commit {
13081308
message: message.to_owned().into(),
13091309
tree: git_tree_id,
1310-
author: author.into(),
1311-
committer: committer.into(),
1310+
author: author.clone(),
1311+
committer: committer.clone(),
13121312
encoding: None,
13131313
parents: parents.clone(),
13141314
extra_headers: extra_headers.clone(),

0 commit comments

Comments
 (0)