From 219a63540f5405337e5af53cada290cbb001185d Mon Sep 17 00:00:00 2001 From: Tim Janik Date: Thu, 11 Jul 2024 16:54:29 +0200 Subject: [PATCH] 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 --- lib/src/local_working_copy.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/src/local_working_copy.rs b/lib/src/local_working_copy.rs index 6e104e74bf..7a52af951d 100644 --- a/lib/src/local_working_copy.rs +++ b/lib/src/local_working_copy.rs @@ -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) => {