mirror of
https://github.com/martinvonz/jj.git
synced 2025-01-20 03:20:08 +00:00
local_working_copy: move comment about conflict file to the right place
I also removed "now" from "is now a normal file" because conflicts should be materialized as a normal file. "is a normal file" is tested by caller.
This commit is contained in:
parent
e41ffa7ada
commit
8e54e3e70e
1 changed files with 3 additions and 2 deletions
|
@ -1315,8 +1315,6 @@ impl TreeState {
|
||||||
executable: FileExecutableFlag,
|
executable: FileExecutableFlag,
|
||||||
conflict_marker_style: ConflictMarkerStyle,
|
conflict_marker_style: ConflictMarkerStyle,
|
||||||
) -> Result<MergedTreeValue, SnapshotError> {
|
) -> Result<MergedTreeValue, SnapshotError> {
|
||||||
// If the file contained a conflict before and is now a normal file on disk, we
|
|
||||||
// try to parse any conflict markers in the file into a conflict.
|
|
||||||
if let Some(current_tree_value) = current_tree_values.as_resolved() {
|
if let Some(current_tree_value) = current_tree_values.as_resolved() {
|
||||||
#[cfg(unix)]
|
#[cfg(unix)]
|
||||||
let _ = current_tree_value; // use the variable
|
let _ = current_tree_value; // use the variable
|
||||||
|
@ -1333,6 +1331,9 @@ impl TreeState {
|
||||||
};
|
};
|
||||||
Ok(Merge::normal(TreeValue::File { id, executable }))
|
Ok(Merge::normal(TreeValue::File { id, executable }))
|
||||||
} else if let Some(old_file_ids) = current_tree_values.to_file_merge() {
|
} else if let Some(old_file_ids) = current_tree_values.to_file_merge() {
|
||||||
|
// If the file contained a conflict before and is a normal file on
|
||||||
|
// disk, we try to parse any conflict markers in the file into a
|
||||||
|
// conflict.
|
||||||
let content = fs::read(disk_path).map_err(|err| SnapshotError::Other {
|
let content = fs::read(disk_path).map_err(|err| SnapshotError::Other {
|
||||||
message: format!("Failed to open file {}", disk_path.display()),
|
message: format!("Failed to open file {}", disk_path.display()),
|
||||||
err: err.into(),
|
err: err.into(),
|
||||||
|
|
Loading…
Reference in a new issue