Skip to content

Commit

Permalink
local_working_copy: fix warnings ending up on stdout
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
tim-janik authored and yuja committed Jul 12, 2024
1 parent ffd7b41 commit 219a635
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/src/local_working_copy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(_) => {
Expand Down Expand Up @@ -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) => {
Expand Down

0 comments on commit 219a635

Please sign in to comment.