mirror of
https://seed.radicle.dev/rad:z6cFWeWpnZNHh9rUW8phgA3b5yGt.git
synced 2026-10-18 19:10:31 +08:00
git2: 0.20 → 0.21
This commit is contained in:
committed by
Fintan Halpenny
parent
fffcfa433d
commit
354fa416f9
Generated
+4
-5
@@ -294,15 +294,14 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "git2"
|
||||
version = "0.20.4"
|
||||
version = "0.21.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "7b88256088d75a56f8ecfa070513a775dd9107f6530ef14919dac831af9cfe2b"
|
||||
checksum = "ddddbf932745a6be37109b6112d3ee09696106f848449069d3a57bba937ab82e"
|
||||
dependencies = [
|
||||
"bitflags 2.6.0",
|
||||
"libc",
|
||||
"libgit2-sys",
|
||||
"log",
|
||||
"url",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -485,9 +484,9 @@ checksum = "97b3888a4aecf77e811145cadf6eef5901f4782c53886191b2f693f24761847c"
|
||||
|
||||
[[package]]
|
||||
name = "libgit2-sys"
|
||||
version = "0.18.3+1.9.2"
|
||||
version = "0.18.4+1.9.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c9b3acc4b91781bb0b3386669d325163746af5f6e4f73e6d2d630e09a35f3487"
|
||||
checksum = "9b26f66f35e1871b22efcf7191564123d2a446ca0538cde63c23adfefa9b15b7"
|
||||
dependencies = [
|
||||
"cc",
|
||||
"libc",
|
||||
|
||||
+1
-1
@@ -23,4 +23,4 @@ repository = "https://app.radicle.xyz/nodes/seed.radicle.xyz/rad:z6cFWeWpnZNHh9r
|
||||
rust-version = "1.78.0"
|
||||
|
||||
[workspace.dependencies]
|
||||
git2 = { version = "0.20", default-features = false, features = ["vendored-libgit2"] }
|
||||
git2 = { version = "0.21", default-features = false, features = ["vendored-libgit2"] }
|
||||
|
||||
@@ -92,8 +92,9 @@ impl<'a> Blob<'a> {
|
||||
Branch::Ref(reference) => {
|
||||
match (reference.target(), reference.symbolic_target()) {
|
||||
(Some(oid), _) => Ok(revwalk::Start::Oid(oid)),
|
||||
(_, Some(sym)) => Ok(revwalk::Start::Ref(sym.to_string())),
|
||||
(_, _) => Err(Error::NotFound(NotFound::NoRefTarget)),
|
||||
(_, Ok(Some(sym))) => Ok(revwalk::Start::Ref(sym.to_string())),
|
||||
(_, Ok(None)) => Err(Error::NotFound(NotFound::NoRefTarget)),
|
||||
(_, Err(err)) => Err(Error::Git(err)),
|
||||
}
|
||||
}
|
||||
}?;
|
||||
|
||||
@@ -276,7 +276,10 @@ impl TryFrom<git2::Buf> for Commit {
|
||||
type Error = error::Parse;
|
||||
|
||||
fn try_from(value: git2::Buf) -> Result<Self, Self::Error> {
|
||||
value.as_str().ok_or(error::Parse::InvalidFormat)?.parse()
|
||||
value
|
||||
.as_str()
|
||||
.map_err(|_| error::Parse::InvalidFormat)?
|
||||
.parse()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -12,5 +12,5 @@ pub fn gen_oid(kind: git2::ObjectType) -> impl Strategy<Value = Oid> {
|
||||
/// of the type indicated in parameter `kind` or a zeroed `Oid` with
|
||||
/// equal probability
|
||||
pub fn gen_oid_with_zero(kind: git2::ObjectType) -> impl Strategy<Value = Oid> {
|
||||
prop_oneof![gen_oid(kind), Just(git2::Oid::zero().into()),]
|
||||
prop_oneof![gen_oid(kind), Just(git2::Oid::ZERO_SHA1.into()),]
|
||||
}
|
||||
|
||||
@@ -269,7 +269,10 @@ impl Entry {
|
||||
path: PathBuf,
|
||||
repo: &Repository,
|
||||
) -> Result<Self, error::Directory> {
|
||||
let name = entry.name().ok_or(error::Directory::Utf8Error)?.to_string();
|
||||
let name = entry
|
||||
.name()
|
||||
.map_err(|_| error::Directory::Utf8Error)?
|
||||
.to_string();
|
||||
let id = entry.id().into();
|
||||
|
||||
match entry.kind() {
|
||||
|
||||
Reference in New Issue
Block a user