Skip to main content

push_branch_tracked

Function push_branch_tracked 

Source
pub fn push_branch_tracked(
    cwd: &Path,
    tx: &dyn Transport,
    remote: &str,
    branch: &str,
    remote_branch: &str,
    lease: PushLease,
    authority: Option<&dyn StepAuthority>,
) -> Result<(Hash, usize), DispatchError>
Expand description

Push the current branch to its upstream and, on success, advance the local remote-tracking ref refs/remotes/<remote>/<branch> to the pushed tip.

remote is the upstream remote NAME (for the tracking-ref namespace); branch is the local branch name; remote_branch is the branch name on the remote (refs/heads/<remote_branch>).

Returns the pushed tip and the number of advances it took: more than one when the push was split along first-parent history (see push_branch_steps). The tracking ref follows every published advance.