Skip to main content

early

Function early 

Source
pub fn early() -> Outcome
Expand description

The same contract, said at the FIRST COMMIT — pre-commit-branch-pattern.

pre-push is the enforcement point, and it is also the worst possible moment to learn the rule: the work is done and stacked on a name that now has to change, usually by an agent or a person who never saw the contract before creating the branch. This is usual-name’s argument applied to branch names — say it at the first commit, when the fix is one git branch -m and nothing is built on top.

A warning, never a block, and quiet in every state where the push check would not judge this branch:

  • a DETACHED head (rebase, cherry-pick, bisect) names no branch;
  • a repository with no remote has nothing this contract gates;
  • a branch with a remote-tracking ref under any remote already exists on a server. pre-push authorises an existing branch by its non-zero remote oid; the remote-tracking ref is the local mirror of that same fact, and costs no network to consult.