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
impl StatusOptions
sourcepub fn new() -> StatusOptions
pub fn new() -> StatusOptions
Creates a new blank set of status options.
sourcepub fn show(&mut self, show: StatusShow) -> &mut StatusOptions
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.
sourcepub fn pathspec<T: IntoCString>(&mut self, pathspec: T) -> &mut StatusOptions
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.
sourcepub fn include_untracked(&mut self, include: bool) -> &mut StatusOptions
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.
sourcepub fn include_ignored(&mut self, include: bool) -> &mut StatusOptions
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.
sourcepub fn include_unmodified(&mut self, include: bool) -> &mut StatusOptions
pub fn include_unmodified(&mut self, include: bool) -> &mut StatusOptions
Flag to include unmodified files.
sourcepub fn exclude_submodules(&mut self, exclude: bool) -> &mut StatusOptions
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).
sourcepub fn recurse_untracked_dirs(&mut self, include: bool) -> &mut StatusOptions
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).
sourcepub fn disable_pathspec_match(&mut self, include: bool) -> &mut StatusOptions
pub fn disable_pathspec_match(&mut self, include: bool) -> &mut StatusOptions
Indicates that the given paths should be treated as literals paths, note patterns.
sourcepub fn recurse_ignored_dirs(&mut self, include: bool) -> &mut StatusOptions
pub fn recurse_ignored_dirs(&mut self, include: bool) -> &mut StatusOptions
Indicates that the contents of ignored directories should be included in the status.
sourcepub fn renames_head_to_index(&mut self, include: bool) -> &mut StatusOptions
pub fn renames_head_to_index(&mut self, include: bool) -> &mut StatusOptions
Indicates that rename detection should be processed between the head.
sourcepub fn renames_index_to_workdir(&mut self, include: bool) -> &mut StatusOptions
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.
sourcepub fn sort_case_sensitively(&mut self, include: bool) -> &mut StatusOptions
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.
sourcepub fn sort_case_insensitively(&mut self, include: bool) -> &mut StatusOptions
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.
sourcepub fn renames_from_rewrites(&mut self, include: bool) -> &mut StatusOptions
pub fn renames_from_rewrites(&mut self, include: bool) -> &mut StatusOptions
Indicates that rename detection should include rewritten files.
sourcepub fn no_refresh(&mut self, include: bool) -> &mut StatusOptions
pub fn no_refresh(&mut self, include: bool) -> &mut StatusOptions
Bypasses the default status behavior of doing a “soft” index reload.
sourcepub fn update_index(&mut self, include: bool) -> &mut StatusOptions
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.
pub fn include_unreadable(&mut self, include: bool) -> &mut StatusOptions
pub fn include_unreadable_as_untracked( &mut self, include: bool, ) -> &mut StatusOptions
sourcepub fn rename_threshold(&mut self, threshold: u16) -> &mut StatusOptions
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.
sourcepub unsafe fn raw(&mut self) -> *const git_status_options
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.