diff options
Diffstat (limited to 'src/tabs')
-rw-r--r-- | src/tabs/status.rs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/tabs/status.rs b/src/tabs/status.rs index e17ce384..765ae1c4 100644 --- a/src/tabs/status.rs +++ b/src/tabs/status.rs @@ -21,7 +21,7 @@ use asyncgit::{ }, sync::{BranchCompare, CommitId}, AsyncBranchesJob, AsyncDiff, AsyncGitNotification, AsyncStatus, - DiffParams, DiffType, PushType, StatusParams, + DiffParams, DiffType, PushType, StatusItem, StatusParams, }; use crossbeam_channel::Sender; use crossterm::event::Event; @@ -465,6 +465,10 @@ impl Status { Ok(()) } + pub fn get_files_changes(&mut self) -> Result<Vec<StatusItem>> { + Ok(self.git_status_stage.last()?.items) + } + fn update_status(&mut self) -> Result<()> { let stage_status = self.git_status_stage.last()?; self.index.set_items(&stage_status.items)?; |