gix_refspec/
types.rs

1use crate::instruction;
2
3/// The way to interpret a refspec.
4#[derive(PartialOrd, Ord, PartialEq, Eq, Copy, Clone, Hash, Debug)]
5pub(crate) enum Mode {
6    /// Apply standard rules for refspecs which are including refs with specific rules related to allowing fast forwards of destinations.
7    Normal,
8    /// Even though according to normal rules a non-fastforward would be denied, override this and reset a ref forcefully in the destination.
9    Force,
10    /// Instead of considering matching refs included, we consider them excluded. This applies only to the source side of a refspec.
11    Negative,
12}
13
14/// Tells what to do and is derived from a [`RefSpec`][crate::RefSpecRef].
15#[derive(PartialOrd, Ord, PartialEq, Eq, Copy, Clone, Hash, Debug)]
16pub enum Instruction<'a> {
17    /// An instruction for pushing.
18    Push(instruction::Push<'a>),
19    /// An instruction for fetching.
20    Fetch(instruction::Fetch<'a>),
21}