Showing the changes to git-commitgraph/src (1 of 18 files). Show all
Unified · Split
| @@ -175,10 +175,8 @@ fn verify_split_chain_filename_hash( · 174 unmodified lines | ||
| 175 | 175 | .and_then(|filename| filename.to_str()) |
| 176 | 176 | .and_then(|filename| filename.strip_suffix(".graph")) |
| 177 | 177 | .and_then(|stem| stem.strip_prefix("graph-")) |
| 178 | − .map_or(Ok(()), |hex| { | |
| 179 | − match git_hash::ObjectId::from_40_bytes_in_hex(hex.as_bytes()) { | |
| 180 | − Ok(actual) if actual.to_borrowed() == expected => Ok(()), | |
| 181 | − _ => Err(format!("graph-{}.graph", expected.to_sha1_hex().as_bstr())), | |
| 182 | − } | |
| 178 | + .map_or(Ok(()), |hex| match git_hash::ObjectId::from_hex(hex.as_bytes()) { | |
| 179 | + Ok(actual) if actual.to_borrowed() == expected => Ok(()), | |
| 180 | + _ => Err(format!("graph-{}.graph", expected.to_sha1_hex().as_bstr())), | |
| 183 | 181 | }) |
| 184 | 182 | } |