Harness the power of signify(1) to sign arbitrary git objects
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

rename tree sig load fns

+4 -4
+4 -4
src/utils.rs
··· 175 175 match object.kind().context( 176 176 "Failed to determine kind of git object, while determining version of the signature", 177 177 )? { 178 - ObjectType::Tree => Self::load_oid_v0(repo, object), 179 - ObjectType::Commit => Self::load_oid_v1(repo, object), 178 + ObjectType::Tree => Self::load_obj_v0(repo, object), 179 + ObjectType::Commit => Self::load_obj_v1_or_greater(repo, object), 180 180 _ => anyhow::bail!( 181 181 "Invalid object kind provided, while loading tree signature with oid={oid}" 182 182 ), ··· 184 184 } 185 185 186 186 /// Load a v0 [`TreeSignature`]. 187 - fn load_oid_v0(repo: &'repo Repository, object: Object<'repo>) -> Result<Self> { 187 + fn load_obj_v0(repo: &'repo Repository, object: Object<'repo>) -> Result<Self> { 188 188 let tree = object.as_tree().with_context(|| { 189 189 format!( 190 190 "No tree signature found for object with oid={}", ··· 217 217 } 218 218 219 219 /// Load a v1 [`TreeSignature`]. 220 - fn load_oid_v1(repo: &'repo Repository, object: Object<'repo>) -> Result<Self> { 220 + fn load_obj_v1_or_greater(repo: &'repo Repository, object: Object<'repo>) -> Result<Self> { 221 221 let commit = object 222 222 .as_commit() 223 223 .context("Failed to retrieve v1 git commit with signature")?;