From d5430a9258203015d17a628c06da919f130d90b3 Mon Sep 17 00:00:00 2001 From: Ilya Grigoriev Date: Fri, 6 Jan 2023 14:19:19 -0800 Subject: [PATCH] `resolve --list`: account for deletions of special files This will match `jj`'s behavior of being unable to resolve such conflicts or to show readable diffs for them, in the pre-#978 state. This is a fixup of 621293d7c6. --- src/commands.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/commands.rs b/src/commands.rs index 03d2db26a..24f3445ad 100644 --- a/src/commands.rs +++ b/src/commands.rs @@ -2454,7 +2454,10 @@ fn print_conflicted_paths( if deletions > 1 { "s" } else { "" } )); } - for object in conflict.adds.iter() { + // TODO: We might decide it's OK for `jj resolve` to ignore special files in the + // `removes` of a conflict (see e.g. https://github.com/martinvonz/jj/pull/978). In + // that case, `conflict.removes` should be removed below. + for object in itertools::chain(conflict.adds.iter(), conflict.removes.iter()) { seen_objects.insert( match object.value { TreeValue::File {