Radish alpha
h
Radicle Heartwood Protocol & Stack
Radicle
Git (anonymous pull)
Log in to clone via SSH
helper: Add `-o hints` push option
Alexis Sellier committed 2 years ago
commit 623ef278d001a33d10b3c3d280edd7312002e663
parent 9cd1b0ec46c73e42e9c4198909f19a2a748a614f
2 files changed +4 -1
modified radicle-remote-helper/src/lib.rs
@@ -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,
modified radicle-remote-helper/src/push.rs
@@ -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);