Skip to content

Commit 9399fc9

Browse files
committed
Merge branch 'gix_rev_parse_time_format'
2 parents 535e967 + c41c94b commit 9399fc9

File tree

5 files changed

+12
-21
lines changed

5 files changed

+12
-21
lines changed

Cargo.lock

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

gitoxide-core/Cargo.toml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,6 @@ git-repository = { version = "^0.24.0", path = "../git-repository", default-feat
4040
git-pack-for-configuration-only = { package = "git-pack", version = "^0.22.0", path = "../git-pack", default-features = false, features = ["pack-cache-lru-dynamic", "pack-cache-lru-static"] }
4141
git-transport-configuration-only = { package = "git-transport", version = "^0.20.0", path = "../git-transport", default-features = false }
4242
git-commitgraph = { version = "^0.8.2", path = "../git-commitgraph" }
43-
git-config = { version = "^0.7.1", path = "../git-config" }
44-
git-features = { version = "^0.22.4", path = "../git-features" }
4543
serde = { version = "1.0.114", optional = true, default-features = false, features = ["derive"] }
4644
anyhow = "1.0.42"
4745
thiserror = "1.0.34"

gitoxide-core/src/index/checkout.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ pub fn checkout_exclusive(
136136
)
137137
})
138138
.unwrap_or_default(),
139-
git_features::progress::bytes()
139+
git::progress::bytes()
140140
.unwrap()
141141
.display(bytes_written as usize, None, None)
142142
));

gitoxide-core/src/organize.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ use std::{
44
};
55

66
use git::{objs::bstr::ByteSlice, progress, Progress};
7-
use git_config::File;
87
use git_repository as git;
98

109
#[derive(Copy, Clone, Eq, PartialEq)]
@@ -101,9 +100,9 @@ where
101100

102101
fn find_origin_remote(repo: &Path) -> anyhow::Result<Option<git_url::Url>> {
103102
let non_bare = repo.join(".git").join("config");
104-
let local = git_config::Source::Local;
105-
let config = File::from_path_no_includes(non_bare.as_path(), local)
106-
.or_else(|_| File::from_path_no_includes(repo.join("config").as_path(), local))?;
103+
let local = git::config::Source::Local;
104+
let config = git::config::File::from_path_no_includes(non_bare.as_path(), local)
105+
.or_else(|_| git::config::File::from_path_no_includes(repo.join("config").as_path(), local))?;
107106
Ok(config
108107
.string("remote", Some("origin"), "url")
109108
.map(|url| git_url::Url::from_bytes(url.as_ref()))

gitoxide-core/src/repository/revision/explain.rs

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use anyhow::bail;
22
use git::{
3-
bstr::{BStr, BString, ByteSlice},
3+
bstr::{BStr, BString},
44
revision::plumbing::{
55
spec,
66
spec::parse::{
@@ -94,17 +94,13 @@ impl<'a> delegate::Revision for Explain<'a> {
9494
ReflogLookup::Entry(no) => {
9595
writeln!(self.out, "Find entry {} in reflog of '{}' reference", no, ref_name).ok()
9696
}
97-
ReflogLookup::Date(time) => {
98-
let mut buf = Vec::new();
99-
time.write_to(&mut buf).ok()?;
100-
writeln!(
101-
self.out,
102-
"Find entry closest to time {} in reflog of '{}' reference",
103-
buf.as_bstr(),
104-
ref_name
105-
)
106-
.ok()
107-
}
97+
ReflogLookup::Date(time) => writeln!(
98+
self.out,
99+
"Find entry closest to time {} in reflog of '{}' reference",
100+
time.format(git::date::time::format::ISO8601),
101+
ref_name
102+
)
103+
.ok(),
108104
}
109105
}
110106

0 commit comments

Comments
 (0)