Struct git2::MergeOptions

source ·
pub struct MergeOptions { /* private fields */ }
Expand description

Options to specify when merging.

Implementations§

source§

impl MergeOptions

source

pub fn new() -> MergeOptions

Creates a default set of merge options.

source

pub fn find_renames(&mut self, find: bool) -> &mut MergeOptions

Detect file renames

source

pub fn fail_on_conflict(&mut self, fail: bool) -> &mut MergeOptions

If a conflict occurs, exit immediately instead of attempting to continue resolving conflicts

source

pub fn skip_reuc(&mut self, skip: bool) -> &mut MergeOptions

Do not write the REUC extension on the generated index

source

pub fn no_recursive(&mut self, disable: bool) -> &mut MergeOptions

If the commits being merged have multiple merge bases, do not build a recursive merge base (by merging the multiple merge bases), instead simply use the first base.

source

pub fn rename_threshold(&mut self, thresh: u32) -> &mut MergeOptions

Similarity to consider a file renamed (default 50)

source

pub fn target_limit(&mut self, limit: u32) -> &mut MergeOptions

Maximum similarity sources to examine for renames (default 200). If the number of rename candidates (add / delete pairs) is greater than this value, inexact rename detection is aborted. This setting overrides the merge.renameLimit configuration value.

source

pub fn recursion_limit(&mut self, limit: u32) -> &mut MergeOptions

Maximum number of times to merge common ancestors to build a virtual merge base when faced with criss-cross merges. When this limit is reached, the next ancestor will simply be used instead of attempting to merge it. The default is unlimited.

source

pub fn file_favor(&mut self, favor: FileFavor) -> &mut MergeOptions

Specify a side to favor for resolving conflicts

source

pub fn standard_style(&mut self, standard: bool) -> &mut MergeOptions

Create standard conflicted merge files

source

pub fn diff3_style(&mut self, diff3: bool) -> &mut MergeOptions

Create diff3-style file

source

pub fn simplify_alnum(&mut self, simplify: bool) -> &mut MergeOptions

Condense non-alphanumeric regions for simplified diff file

source

pub fn ignore_whitespace(&mut self, ignore: bool) -> &mut MergeOptions

Ignore all whitespace

source

pub fn ignore_whitespace_change(&mut self, ignore: bool) -> &mut MergeOptions

Ignore changes in amount of whitespace

source

pub fn ignore_whitespace_eol(&mut self, ignore: bool) -> &mut MergeOptions

Ignore whitespace at end of line

source

pub fn patience(&mut self, patience: bool) -> &mut MergeOptions

Use the “patience diff” algorithm

source

pub fn minimal(&mut self, minimal: bool) -> &mut MergeOptions

Take extra time to find minimal diff

source

pub unsafe fn raw(&self) -> *const git_merge_options

Acquire a pointer to the underlying raw options.

Trait Implementations§

source§

impl Default for MergeOptions

source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.