helper: Add `-o hints` push option
Works even if you have hints disabled in config.
This commit is contained in:
parent
9cd1b0ec46
commit
623ef278d0
|
|
@ -77,6 +77,8 @@ pub struct Allow {
|
|||
pub struct Options {
|
||||
/// Don't sync after push.
|
||||
no_sync: bool,
|
||||
/// Enable hints.
|
||||
hints: bool,
|
||||
/// Open patch in draft mode.
|
||||
draft: bool,
|
||||
/// Patch base to use, when opening or updating a patch.
|
||||
|
|
@ -206,6 +208,7 @@ pub fn run(profile: radicle::Profile) -> Result<(), Error> {
|
|||
/// hence the arguments are passed as a slice.
|
||||
fn push_option(args: &[&str], opts: &mut Options) -> Result<(), Error> {
|
||||
match args {
|
||||
["hints"] => opts.hints = true,
|
||||
["sync"] => opts.no_sync = false,
|
||||
["no-sync"] => opts.no_sync = true,
|
||||
["patch.draft"] => opts.draft = true,
|
||||
|
|
|
|||
|
|
@ -173,7 +173,7 @@ pub fn run(
|
|||
let signer = profile.signer()?;
|
||||
let mut line = String::new();
|
||||
let mut ok = HashMap::new();
|
||||
let hints = profile.hints();
|
||||
let hints = opts.hints || profile.hints();
|
||||
|
||||
assert_eq!(signer.public_key(), &nid);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue