Skip to main content

gix/
push.rs

1/// All possible values of `push.default`.
2#[derive(Default, Copy, Clone, PartialOrd, PartialEq, Ord, Eq, Hash, Debug)]
3pub enum Default {
4    /// Do not push anything unless a refspec is provided explicitly.
5    ///
6    /// This is for safety.
7    Nothing,
8    /// Push the current branch to update a remote branch with the same name.
9    Current,
10    /// Push the current branch to the branch it would fetch from and merge with,
11    /// i.e. what is configured in `branch.<name>.merge`, retrievable with
12    /// the `@{upstream}` refspec.
13    Upstream,
14    /// Push the current branch with the same name to the remote.
15    /// This is the same as [`Current`](Default::Current), but fails if
16    /// `branch.<name>.merge` is set to a branch that is named differently.
17    #[default]
18    Simple,
19    /// Push *all* branches to their similarly named counterpart on the remote.
20    Matching,
21}