tweak "failed to find expected lines" message in apply_patch (#3374)
It was hard for me to read the expected lines as a `["one", "two", "three"]` array, maybe not so hard for the model but probably not having to un-escape in its head would help it out :) Co-authored-by: Codex <199175422+chatgpt-codex-connector[bot]@users.noreply.github.com>
This commit is contained in:
@@ -726,9 +726,9 @@ fn compute_replacements(
|
|||||||
line_index = start_idx + pattern.len();
|
line_index = start_idx + pattern.len();
|
||||||
} else {
|
} else {
|
||||||
return Err(ApplyPatchError::ComputeReplacements(format!(
|
return Err(ApplyPatchError::ComputeReplacements(format!(
|
||||||
"Failed to find expected lines {:?} in {}",
|
"Failed to find expected lines in {}:\n{}",
|
||||||
chunk.old_lines,
|
path.display(),
|
||||||
path.display()
|
chunk.old_lines.join("\n"),
|
||||||
)));
|
)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user