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

local_working_copy: fix warnings ending up on stdout

As suggested by @crackcomm on discord, use eprintln!() to print warnings
to avoid messing up template output, e.g.:

jj --no-pager --ignore-working-copy show --tool true -T change_id -r rv...
rv...ignoring git submodule at "some/submodule"

Signed-off-by: Tim Janik <timj@gnu.org>
This commit is contained in:
Tim Janik 2024-07-11 16:54:29 +02:00 committed by Yuya Nishihara
parent ffd7b41d2b
commit 219a63540f

View file

@ -1416,7 +1416,7 @@ impl TreeState {
}
}
MaterializedTreeValue::GitSubmodule(_) => {
println!("ignoring git submodule at {path:?}");
eprintln!("ignoring git submodule at {path:?}");
FileState::for_gitsubmodule()
}
MaterializedTreeValue::Tree(_) => {
@ -1463,7 +1463,7 @@ impl TreeState {
panic!("unexpected conflict entry in diff at {path:?}");
}
TreeValue::GitSubmodule(_id) => {
println!("ignoring git submodule at {path:?}");
eprintln!("ignoring git submodule at {path:?}");
FileType::GitSubmodule
}
TreeValue::Tree(_id) => {