pub struct Warning {
pub key_id: [u8; 8],
pub key_path: PathBuf,
pub declared: usize,
pub still_open: usize,
pub sweeping: Vec<PathBuf>,
}Expand description
Everything lock says before it does anything irreversible.
A value rather than a printed string so the same text reaches the user in both modes, and so a test can assert on it without capturing a stream. It names the key by fingerprint and never by material: printing the key here was considered and rejected — it would survive in scrollback, in a terminal multiplexer’s buffer, in a CI log, and in the working tree the moment someone redirects this command’s output.
Fields§
§key_id: [u8; 8]Fingerprint of the key about to be deleted.
key_path: PathBufWhere that key lives.
declared: usizeHow many working-tree files the declaration selects.
still_open: usizeHow many of those are still plaintext, so will actually change.
sweeping: Vec<PathBuf>Temporary files this run will delete.
Named here rather than only in the closing report, because deleting an untracked file is irreversible and disclosing it afterwards is too late to be a disclosure.