As part of the continued effort of safe by default, rad init has been
updated to --no-announce, --announce has been introduced to enable
the prior behaviour. Additionally a message is supplied to the user
about their repository not being announced.
cli: Add interactive step for announce during init
If the visibility is private then no announcement is required, if it's public and no cli arg has been passed (--announce, --no-announce) then prompt user to choose. Defaults to no announce for safety.
As rad patch review --patch is obsolete (it says so) and without --patch,
the command crashes for me (see issue
2942c9b3cc41fc92a85d3d3f59c984d5da61c412), here goes my review:
That hunk:
pub(super) fn announce(&self) -> Option<bool> {
match (self.announce, self.no_announce) {
(false, false) => None,
(false, true) => Some(false),
(true, false) => Some(true),
(true, true) => Some(false),
}
}
could be written something like
pub(super) fn announce(&self) -> Option<bool> {
if !self.announce && !self.no_announce {
None
} else {
Some(self.announce && !self.no_announce)
}
}
right?
Besides that it looks good to me.