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

index: on reindexing, print error details to stderr

It's not ideal to print the error there, but using stderr should be slightly
better. It could be a tracing message, but tracing won't be displayed by
default.
This commit is contained in:
Yuya Nishihara 2024-02-10 15:29:21 +09:00
parent b0e8e2a1af
commit 1f6d1de62d

View file

@ -331,7 +331,7 @@ impl IndexStore for DefaultIndexStore {
// If the index was corrupt (maybe it was written in a different format),
// we just reindex.
// TODO: Move this message to a callback or something.
println!("The index was corrupt (maybe the format has changed). Reindexing...");
eprintln!("{err}: {source}. Reindexing...", source = err.error);
self.reinit().map_err(|err| IndexReadError(err.into()))?;
self.build_index_segments_at_operation(op, store)
}