Restoring something from previous commit

I was having issues with this line, but did not mean to drop the context.
This commit is contained in:
Mattias Granlund 2023-07-22 22:02:34 +01:00
parent fac9bff162
commit e9d4dc664c

View File

@ -2563,7 +2563,9 @@ fn tree_to_entry_list(
let blob = object.as_blob().context("failed to get blob")?; let blob = object.as_blob().context("failed to get blob")?;
// convert content to string // convert content to string
let octal_mode = format!("{:o}", entry.filemode()); let octal_mode = format!("{:o}", entry.filemode());
if let Ok(content) = std::str::from_utf8(blob.content()) { if let Ok(content) =
std::str::from_utf8(blob.content()).context("failed to convert content to string")
{
file_list.push(( file_list.push((
path.to_string(), path.to_string(),
octal_mode, octal_mode,