Skip to main content

gate_push

Function gate_push 

Source
pub fn gate_push(
    rule: Option<&Rule>,
    line: &str,
    cwd: Option<&str>,
) -> Option<Rule>
Expand description

The verdict the push gate makes of a line: None lets it run. An ordinary branch push is allowed, including when a seat rule says git push* and when the remote’s owner cannot be read. Force, a +refspec, deleting a remote branch, and a mirror push ask by default. A tag push is ordinary. That ask does not wait for a seat rule. A seat rule that denies the dangerous push still denies it. A rule about some other command on the same line is left as it is when the push itself is ordinary.