Skip to content

gix rev parse uses ISO8601 time format. #527

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 1 commit into from
Sep 6, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions gitoxide-core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ git-transport-configuration-only = { package = "git-transport", version = "^0.20
git-commitgraph = { version = "^0.8.2", path = "../git-commitgraph" }
git-config = { version = "^0.7.1", path = "../git-config" }
git-features = { version = "^0.22.4", path = "../git-features" }
git-date = { version = "^0.1.0", path = "../git-date" }
serde = { version = "1.0.114", optional = true, default-features = false, features = ["derive"] }
anyhow = "1.0.42"
thiserror = "1.0.34"
Expand Down
18 changes: 7 additions & 11 deletions gitoxide-core/src/repository/revision/explain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,17 +94,13 @@ impl<'a> delegate::Revision for Explain<'a> {
ReflogLookup::Entry(no) => {
writeln!(self.out, "Find entry {} in reflog of '{}' reference", no, ref_name).ok()
}
ReflogLookup::Date(time) => {
let mut buf = Vec::new();
time.write_to(&mut buf).ok()?;
writeln!(
self.out,
"Find entry closest to time {} in reflog of '{}' reference",
buf.as_bstr(),
ref_name
)
.ok()
}
ReflogLookup::Date(time) => writeln!(
self.out,
"Find entry closest to time {} in reflog of '{}' reference",
time.format(git_date::time::format::ISO8601),
ref_name
)
.ok(),
}
}

Expand Down