Radish alpha
h
Radicle Heartwood Protocol & Stack
Radicle
Git (anonymous pull)
Log in to clone via SSH
remote-helper: Prevent doubly verifying each push
✗ CI failure Lorenz Leutgeb committed 7 months ago
commit 379037956a6cb88cb826a7f57276fca4a2c6c084
parent a0f6cbf5f1791cd92e62710a0900b5aa6f8345a8
1 passed 1 failed (2 total) View logs
1 file changed +12 -2
modified crates/radicle-remote-helper/src/push.rs
@@ -890,8 +890,18 @@ fn push_ref(
    // This happens during the `list for-push` phase.
    let refspec = git::Refspec { src, dst, force };
    let repo = working.workdir().unwrap_or_else(|| working.path());
-
 
-
    let mut args = vec!["push".to_string()];
+

+
    let mut args = vec![
+
        "push".to_string(),
+
        // This push is "internal" from the point of view of the user.
+
        // If they want to run a pre-push hook, then they would configure
+
        // this on their remote, and the hook would run before we get here.
+
        // However, the context of this invocation of `git push` is
+
        // the same repository, so if the user has configured a pre-push
+
        // hook it would run twice, which is not what we want, so set this
+
        // option.
+
        "--no-verify".to_string(),
+
    ];

    let verbosity: git::Verbosity = verbosity.into();
    args.extend(verbosity.into_flag());