Skip to main content

RepoTab

Struct RepoTab 

Source
pub struct RepoTab {
Show 51 fields pub repo_path: Option<PathBuf>, pub repo_info: Option<RepoInfo>, pub branches: Vec<BranchInfo>, pub branch_list_state: ListState, pub commits: Vec<CommitInfo>, pub graph_rows: Vec<GraphRow>, pub commit_list_state: ListState, pub unstaged_changes: Vec<DiffInfo>, pub staged_changes: Vec<DiffInfo>, pub unstaged_list_state: ListState, pub staged_list_state: ListState, pub staging_focus: StagingFocus, pub selected_diff: Option<DiffInfo>, pub diff_scroll: u16, pub diff_sub_pane: DiffSubPane, pub anchor_file_index: Option<usize>, pub selected_file_indices: HashSet<usize>, pub commit_diffs: HashMap<usize, DiffInfo>, pub commit_diff_file_index: usize, pub commit_files: Vec<DiffFileEntry>, pub selected_commit_oid: Option<String>, pub stashes: Vec<StashEntry>, pub stash_list_state: ListState, pub remotes: Vec<RemoteInfo>, pub search_query: String, pub search_active: bool, pub search_results: Vec<CommitInfo>, pub stash_message_buffer: String, pub status_message: Option<String>, pub error_message: Option<String>, pub is_loading: bool, pub confirm_discard: bool, pub selected_unstaged: HashSet<usize>, pub selected_staged: HashSet<usize>, pub anchor_unstaged: Option<usize>, pub anchor_staged: Option<usize>, pub anchor_commit_index: Option<usize>, pub selected_commits: Vec<usize>, pub commit_range_diffs: Vec<DiffInfo>, pub commit_action_items: Vec<CommitActionKind>, pub commit_action_cursor: usize, pub pending_commit_action_oid: Option<String>, pub pending_action_kind: Option<CommitActionKind>, pub action_input1: String, pub file_history_path: Option<String>, pub file_history_commits: Vec<CommitInfo>, pub file_history_cursor: usize, pub blame_path: Option<String>, pub blame_lines: Vec<BlameLine>, pub blame_scroll: u16, pub confirm_delete_file: Option<String>,
}
Expand description

All state that belongs to a single repository tab.

Fields§

§repo_path: Option<PathBuf>§repo_info: Option<RepoInfo>§branches: Vec<BranchInfo>§branch_list_state: ListState§commits: Vec<CommitInfo>§graph_rows: Vec<GraphRow>§commit_list_state: ListState§unstaged_changes: Vec<DiffInfo>§staged_changes: Vec<DiffInfo>§unstaged_list_state: ListState§staged_list_state: ListState§staging_focus: StagingFocus§selected_diff: Option<DiffInfo>§diff_scroll: u16§diff_sub_pane: DiffSubPane

Which half of the diff split pane has keyboard focus.

§anchor_file_index: Option<usize>

Anchor index for diff file list range selection (set on plain navigation).

§selected_file_indices: HashSet<usize>

File indices currently multi-selected in the diff file list.

§commit_diffs: HashMap<usize, DiffInfo>

Cache of per-file diffs keyed by file index (sparse — only loaded files are present).

§commit_diff_file_index: usize

Index of the currently selected file in commit_files.

§commit_files: Vec<DiffFileEntry>

Lightweight file list for the selected commit.

§selected_commit_oid: Option<String>

OID of the currently selected commit (for lazy file diff loading).

§stashes: Vec<StashEntry>§stash_list_state: ListState§remotes: Vec<RemoteInfo>§search_query: String

Search query for commit filtering.

§search_active: bool

Whether search mode is active.

§search_results: Vec<CommitInfo>

Search results (commits matching the query).

§stash_message_buffer: String

Optional stash message (set via input mode before saving).

§status_message: Option<String>§error_message: Option<String>§is_loading: bool

True while a background task is in flight for this tab.

§confirm_discard: bool

When true, the next d press actually discards; otherwise the first d sets this flag and shows a confirmation prompt.

§selected_unstaged: HashSet<usize>

Selected unstaged file indices for multi-select.

§selected_staged: HashSet<usize>

Selected staged file indices for multi-select.

§anchor_unstaged: Option<usize>

Anchor index for unstaged range selection (set on plain j/k navigation).

§anchor_staged: Option<usize>

Anchor index for staged range selection (set on plain j/k navigation).

§anchor_commit_index: Option<usize>

Anchor commit index for range selection (Shift+Up/Down).

§selected_commits: Vec<usize>

Ordered ascending list of commit indices in the current range selection.

§commit_range_diffs: Vec<DiffInfo>

Combined diff for the current commit range selection.

§commit_action_items: Vec<CommitActionKind>

Flat ordered list of all action kinds shown in the popup (built from COMMIT_MENU_GROUPS, separator positions stored separately).

§commit_action_cursor: usize

Which item in commit_action_items is highlighted (0-based).

§pending_commit_action_oid: Option<String>

OID of the commit targeted by the open action popup.

§pending_action_kind: Option<CommitActionKind>

Action kind waiting for user input before it can execute.

§action_input1: String

First input collected for the pending action (e.g. branch/tag name).

§file_history_path: Option<String>

When Some(path), the file-history overlay is visible for that path.

§file_history_commits: Vec<CommitInfo>

Commits that touch the file in the history overlay (newest first).

§file_history_cursor: usize

Which commit row is highlighted in the history overlay (0-based).

§blame_path: Option<String>

When Some(path), the blame overlay is visible for that path.

§blame_lines: Vec<BlameLine>

Blame lines for the current blame overlay.

§blame_scroll: u16

Scroll offset for the blame overlay (rows from top).

§confirm_delete_file: Option<String>

When Some(path), show a delete-confirmation prompt for that path.

Implementations§

Source§

impl RepoTab

Source

pub fn new() -> Self

Source

pub fn display_name(&self) -> String

Return a human-readable display name for this tab. Uses the last path component of repo_path, or “New Tab” if none.

Trait Implementations§

Source§

impl Default for RepoTab

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> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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 = 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>,

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.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more