27PEEFO5QVDJ2NRHDKLFPQAMETNKUIA5NLS2SGXZ2V3E74R5IQXQC
5DVRL6MFXQOCPOZMYSKBERMRRVUTYRL2SRGRTU2MH4IEOFCDKM3QC
7ZW242MDCXQPBL7JOMRT4RZZFLEZCHMY5KFAWTZCKE6CUZQO7XLAC
L4JXJHWXYNCL4QGJXNKKTOKKTAXKKXBJUUY7HFZGEUZ5A2V5H34QC
SXEYMYF7P4RZMZ46WPL4IZUTSQ2ATBWYZX7QNVMS3SGOYXYOHAGQC
W5V5TVRD3IDOPMRXOIN2BXIJTCJJ5Z272O7SXDBZ6PBRY24JKOAAC
AEPEFS7O3YT7CRRFYQVJWUXUUSRGJ6K6XZQVK62B6N74UXOIFWYAC
/// Identifier of the change (unambiguous prefixes are accepted)
/// Show N changes in a text editor if no <change-id>s were given.
/// Defaults to the value
/// of `unrecord_changes` in your global configuration.
#[clap(long = "show-changes", value_name = "N", conflicts_with("change-id"))]
show_changes: Option<usize>,
/// The hash of a change (unambiguous prefixes are accepted)
let number_of_changes = crate::config::Global::load()
.ok()
.and_then(|cfg| cfg.unrecord_changes)
.unwrap_or(20);
let number_of_changes = if let Some(n) = self.show_changes {
n
} else {
let cfg = crate::config::Global::load()?;
cfg.unrecord_changes.ok_or_else(|| {
anyhow!(
"Can't determine how many changes to show. \
Please set the `unrecord_changes` option in \
your global config or run `pijul unrecord` \
with the `--show-changes` option."
)
})?
};