mirror of
https://github.com/extrawurst/gitui.git
synced 2024-12-26 18:43:37 +03:00
fix: only add selected file
This commit is contained in:
parent
f7fef9d5df
commit
3b270dde39
@ -177,6 +177,7 @@ impl App {
|
||||
}
|
||||
}
|
||||
|
||||
///
|
||||
pub fn update(&mut self) {
|
||||
self.fetch_status();
|
||||
}
|
||||
@ -188,7 +189,7 @@ impl App {
|
||||
let mut index = repo.index().unwrap();
|
||||
|
||||
let path = Path::new(self.status.wt_items[i].path.as_str());
|
||||
index.update_all(path, None).unwrap();
|
||||
index.add_path(path).unwrap();
|
||||
index.write().unwrap();
|
||||
|
||||
self.update();
|
||||
|
@ -14,6 +14,7 @@ use poll::PollResult;
|
||||
use std::{io, time::Duration};
|
||||
use tui::{backend::CrosstermBackend, Terminal};
|
||||
|
||||
//
|
||||
fn main() -> Result<()> {
|
||||
enable_raw_mode()?;
|
||||
io::stdout()
|
||||
|
Loading…
Reference in New Issue
Block a user