Struct git2::StatusOptions

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

Options that can be provided to repo.statuses() to control how the status information is gathered.

Implementations§

source§

impl StatusOptions

source

pub fn new() -> StatusOptions

Creates a new blank set of status options.

source

pub fn show(&mut self, show: StatusShow) -> &mut StatusOptions

Select the files on which to report status.

The default, if unspecified, is to show the index and the working directory.

source

pub fn pathspec<T: IntoCString>(&mut self, pathspec: T) -> &mut StatusOptions

Add a path pattern to match (using fnmatch-style matching).

If the disable_pathspec_match option is given, then this is a literal path to match. If this is not called, then there will be no patterns to match and the entire directory will be used.

source

pub fn include_untracked(&mut self, include: bool) -> &mut StatusOptions

Flag whether untracked files will be included.

Untracked files will only be included if the workdir files are included in the status “show” option.

source

pub fn include_ignored(&mut self, include: bool) -> &mut StatusOptions

Flag whether ignored files will be included.

The files will only be included if the workdir files are included in the status “show” option.

source

pub fn include_unmodified(&mut self, include: bool) -> &mut StatusOptions

Flag to include unmodified files.

source

pub fn exclude_submodules(&mut self, exclude: bool) -> &mut StatusOptions

Flag that submodules should be skipped.

This only applies if there are no pending typechanges to the submodule (either from or to another type).

source

pub fn recurse_untracked_dirs(&mut self, include: bool) -> &mut StatusOptions

Flag that all files in untracked directories should be included.

Normally if an entire directory is new then just the top-level directory is included (with a trailing slash on the entry name).

source

pub fn disable_pathspec_match(&mut self, include: bool) -> &mut StatusOptions

Indicates that the given paths should be treated as literals paths, note patterns.

source

pub fn recurse_ignored_dirs(&mut self, include: bool) -> &mut StatusOptions

Indicates that the contents of ignored directories should be included in the status.

source

pub fn renames_head_to_index(&mut self, include: bool) -> &mut StatusOptions

Indicates that rename detection should be processed between the head.

source

pub fn renames_index_to_workdir(&mut self, include: bool) -> &mut StatusOptions

Indicates that rename detection should be run between the index and the working directory.

source

pub fn sort_case_sensitively(&mut self, include: bool) -> &mut StatusOptions

Override the native case sensitivity for the file system and force the output to be in case sensitive order.

source

pub fn sort_case_insensitively(&mut self, include: bool) -> &mut StatusOptions

Override the native case sensitivity for the file system and force the output to be in case-insensitive order.

source

pub fn renames_from_rewrites(&mut self, include: bool) -> &mut StatusOptions

Indicates that rename detection should include rewritten files.

source

pub fn no_refresh(&mut self, include: bool) -> &mut StatusOptions

Bypasses the default status behavior of doing a “soft” index reload.

source

pub fn update_index(&mut self, include: bool) -> &mut StatusOptions

Refresh the stat cache in the index for files are unchanged but have out of date stat information in the index.

This will result in less work being done on subsequent calls to fetching the status.

source

pub fn include_unreadable(&mut self, include: bool) -> &mut StatusOptions

source

pub fn include_unreadable_as_untracked( &mut self, include: bool ) -> &mut StatusOptions

source

pub fn rename_threshold(&mut self, threshold: u16) -> &mut StatusOptions

Set threshold above which similar files will be considered renames.

This is equivalent to the -M option. Defaults to 50.

source

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

Get a pointer to the inner list of status options.

This function is unsafe as the returned structure has interior pointers and may no longer be valid if these options continue to be mutated.

Trait Implementations§

source§

impl Default for StatusOptions

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.