Skip to content

Commit d22f242

Browse files
committed
chore: update gix to 0.73
1 parent f88c7f0 commit d22f242

File tree

13 files changed

+212
-297
lines changed

13 files changed

+212
-297
lines changed

Cargo.lock

Lines changed: 159 additions & 260 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ clap = { version = "~4.5", default-features = false, features = [
4343
ctrlc = "3.4"
4444
encoding_rs = "0.8"
4545
flate2 = "1"
46-
gix = { version = "0.71", default-features = false, features = [
46+
gix = { version = "0.73", default-features = false, features = [
4747
"command",
4848
"revision",
4949
] }

src/cmd/export.rs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,12 @@ fn run(matches: &clap::ArgMatches) -> Result<()> {
233233
replacements.insert("authemail", Cow::Borrowed(author.email));
234234
replacements.insert(
235235
"authdate",
236-
Cow::Owned(author.time.format(gix::date::time::format::ISO8601).into()),
236+
Cow::Owned(
237+
author
238+
.time()?
239+
.format(gix::date::time::format::ISO8601)
240+
.into(),
241+
),
237242
);
238243
let committer = patch_commit.committer()?;
239244
replacements.insert("commname", Cow::Borrowed(committer.name));
@@ -242,7 +247,7 @@ fn run(matches: &clap::ArgMatches) -> Result<()> {
242247
"commdate",
243248
Cow::Owned(
244249
committer
245-
.time
250+
.time()?
246251
.format(gix::date::time::format::ISO8601)
247252
.into(),
248253
),

src/cmd/import.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -599,10 +599,10 @@ fn create_patch<'repo>(
599599
gix::actor::Signature {
600600
name: BString::from(name),
601601
email: BString::from(email),
602-
time: default_author.time,
602+
time: default_author.time()?,
603603
}
604604
} else {
605-
default_author.to_owned()
605+
default_author.to_owned()?
606606
}
607607
};
608608

src/cmd/pick.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -314,11 +314,11 @@ fn pick_picks(
314314
let author = commit.author_strict()?;
315315
let default_committer = stack.repo.get_committer()?;
316316
let committer = if matches.get_flag("committer-date-is-author-date") {
317-
let mut committer = default_committer.to_owned();
317+
let mut committer = default_committer.to_owned()?;
318318
committer.time = author.time;
319319
committer
320320
} else {
321-
default_committer.to_owned()
321+
default_committer.to_owned()?
322322
};
323323
let parent = if let Some(parent) = opt_parent.as_ref() {
324324
parent.clone()
@@ -332,8 +332,8 @@ fn pick_picks(
332332
(commit.clone(), parent)
333333
};
334334
let new_commit_id = stack.repo.commit_ex(
335-
&author,
336-
&committer,
335+
author.to_ref(&mut gix::date::parse::TimeBuf::default()),
336+
committer.to_ref(&mut gix::date::parse::TimeBuf::default()),
337337
message,
338338
top.tree_id()?.detach(),
339339
[bottom.id],

src/cmd/refresh.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,9 @@ fn run(matches: &ArgMatches) -> Result<()> {
181181

182182
// Make temp patch
183183
let temp_commit_id = stack.repo.commit_ex(
184-
&repo.get_author()?.override_author(matches),
184+
repo.get_author()?
185+
.override_author(matches)
186+
.to_ref(&mut gix::date::parse::TimeBuf::default()),
185187
repo.get_committer()?,
186188
&Message::from(format!("Refresh of {patchname}")),
187189
tree_id,

src/cmd/spill.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -101,16 +101,16 @@ fn run(matches: &ArgMatches) -> Result<()> {
101101
let author = patch_commit.author_strict()?;
102102
let default_committer = repo.get_committer()?;
103103
let committer = if matches.get_flag("committer-date-is-author-date") {
104-
let mut committer = default_committer.to_owned();
104+
let mut committer = default_committer.to_owned()?;
105105
committer.time = author.time;
106106
committer
107107
} else {
108-
default_committer.to_owned()
108+
default_committer.to_owned()?
109109
};
110110

111111
let commit_id = repo.commit_ex(
112-
&author,
113-
&committer,
112+
author.to_ref(&mut gix::date::parse::TimeBuf::default()),
113+
committer.to_ref(&mut gix::date::parse::TimeBuf::default()),
114114
&patch_commit.message_ex(),
115115
tree_id,
116116
patch_commit_ref.parents(),

src/cmd/sync.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -225,15 +225,15 @@ fn run(matches: &clap::ArgMatches) -> Result<()> {
225225
let author = commit.author_strict()?;
226226
let default_committer = trans.repo().get_committer()?;
227227
let committer = if matches.get_flag("committer-date-is-author-date") {
228-
let mut committer = default_committer.to_owned();
228+
let mut committer = default_committer.to_owned()?;
229229
committer.time = author.time;
230230
committer
231231
} else {
232-
default_committer.to_owned()
232+
default_committer.to_owned()?
233233
};
234234
let commit_id = trans.repo().commit_ex(
235-
&author,
236-
&committer,
235+
author.to_ref(&mut gix::date::parse::TimeBuf::default()),
236+
committer.to_ref(&mut gix::date::parse::TimeBuf::default()),
237237
&commit.message_ex(),
238238
tree_id,
239239
[parent_id],

src/ext/commit.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ impl<'a> CommitExtended<'a> for gix::Commit<'a> {
5353
Ok(gix::actor::Signature {
5454
name: BString::from(name.as_ref()),
5555
email: BString::from(email.as_ref()),
56-
time: sig.time,
56+
time: sig.time()?,
5757
})
5858
} else {
5959
Err(anyhow!(

src/ext/repository.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -256,8 +256,8 @@ impl RepositoryExtended for gix::Repository {
256256
let commit_id = self.write_object(&gix::objs::Commit {
257257
tree: tree_id,
258258
parents: parent_ids.into_iter().collect(),
259-
author: author.to_owned(),
260-
committer: committer.to_owned(),
259+
author: author.to_owned()?,
260+
committer: committer.to_owned()?,
261261
encoding: commit_encoding.map(|enc| enc.name().into()),
262262
message: message.raw_bytes().into(),
263263
extra_headers: vec![],

0 commit comments

Comments
 (0)