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.
This commit is contained in:
Ilya Grigoriev 2023-01-06 14:19:19 -08:00
parent 4aeb4f6e2a
commit d5430a9258

View file

@ -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 {