Skip to main content

GeneralConfig

Struct GeneralConfig 

Source
pub struct GeneralConfig {
Show 23 fields pub always_show_help: BoolConfigEntry, pub confirm_quit: BoolConfigEntry, pub refresh_on_file_change: BoolConfigEntry, pub confirm_discard: ConfirmDiscardOption, pub collapsed_sections: Vec<String>, pub stash_list_limit: usize, pub recent_commits_limit: usize, pub log_author_width: usize, pub mouse_support: bool, pub mouse_scroll_lines: usize, pub max_input_bytes: u64, pub verbose_branch_status: bool, pub hide: Vec<String>, pub visit_context_lines: bool, pub status_cursor_on_changes: bool, pub diff_renderer: DiffRendererConfig, pub log_args: Vec<String>, pub show_args: Vec<String>, pub file_header: FileHeader, pub start_folded: bool, pub read_only: ReadOnly, pub commands: BTreeMap<String, String>, pub views: BTreeMap<String, String>,
}

Fields§

§always_show_help: BoolConfigEntry§confirm_quit: BoolConfigEntry§refresh_on_file_change: BoolConfigEntry§confirm_discard: ConfirmDiscardOption§collapsed_sections: Vec<String>§stash_list_limit: usize§recent_commits_limit: usize§log_author_width: usize§mouse_support: bool§mouse_scroll_lines: usize§max_input_bytes: u64

The most input gitu will read, as a pager or when putting a command again. It is read in one pass before anything is drawn, so this is what stops a git log -p over a whole history from showing nothing for minutes. What is past the limit is dropped, not deferred.

§verbose_branch_status: bool

Whether the branch section is ‘Branch: {name}’ over a line placing it relative to its upstream, or the branch name alone.

§hide: Vec<String>

Globs whose files are dropped from a paged view, as if the patch never had them. Generated code and fixtures recur, so hiding them is worth saying once rather than per session.

§visit_context_lines: bool

Whether the cursor stops on a diff’s unchanged lines, as reading a patch line by line wants. Nothing can be staged there.

§status_cursor_on_changes: bool

Whether the status screen opens with the cursor on the first unstaged file, or the first staged one when nothing is unstaged.

§diff_renderer: DiffRendererConfig§log_args: Vec<String>

Arguments given to the git log gitu runs for the log view.

§show_args: Vec<String>

Arguments given to the git show gitu runs for a commit it opens.

§file_header: FileHeader§start_folded: bool

Whether a patch of more than one file that does not fit on one screen starts with its files folded: git diff, git show, git log -p, and a commit opened from the log.

§read_only: ReadOnly

Whether gitu leaves the repository and git config as it finds them.

§commands: BTreeMap<String, String>

Shell commands, by name, run by the keys diff_renderer.feature_keys gives them, with {commit}, {file} and {branch} filled in from what is under the cursor, and {command} from the git command the screen is showing.

§views: BTreeMap<String, String>

git commands, by name, opened as a screen by the keys diff_renderer.feature_keys gives them, filled in as commands are.

Trait Implementations§

Source§

impl Debug for GeneralConfig

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for GeneralConfig

Source§

fn default() -> Self

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

impl<'de> Deserialize<'de> for GeneralConfig

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. 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> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> Downcast for T
where T: Any,

Source§

fn into_any(self: Box<T>) -> Box<dyn Any>

Convert Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.
Source§

fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>

Convert Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be further downcast into Rc<ConcreteType> where ConcreteType implements Trait.
Source§

fn as_any(&self) -> &(dyn Any + 'static)

Convert &Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &Any’s vtable from &Trait’s.
Source§

fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)

Convert &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any’s vtable from &mut Trait’s.
Source§

impl<T> DowncastSync for T
where T: Any + Send + Sync,

Source§

fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Send + Sync> ⓘ

Convert Arc<Trait> (where Trait: Downcast) to Arc<Any>. Arc<Any> can then be further downcast into Arc<ConcreteType> where ConcreteType implements Trait.
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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

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

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

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

Source§

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.