ok/jj
1
0
Fork 0
forked from mirrors/jj

merge_tools: avoid re-reading edited file, read from buffer instead

I suspect this was just because it wasn't obvious to the author how to
get a `Read` from an in-memory buffer (I know it wasn't to me).
This commit is contained in:
Martin von Zweigbergk 2023-05-30 17:08:01 -07:00 committed by Martin von Zweigbergk
parent 04a107babf
commit a5ef4f0f40

View file

@ -271,7 +271,7 @@ pub fn run_mergetool(
let new_tree_value = new_tree_value.unwrap_or({
let new_file_id = tree
.store()
.write_file(repo_path, &mut File::open(paths.get("output").unwrap())?)?;
.write_file(repo_path, &mut output_file_contents.as_slice())?;
TreeValue::File {
id: new_file_id,
executable: false,