suport resetting untracked files

This commit is contained in:
Stephan Dilly 2020-03-24 09:55:51 +01:00
parent 7d76db09cc
commit cf4c4721dc
2 changed files with 3 additions and 2 deletions

View file

@ -14,7 +14,8 @@ blazing fast terminal-ui for git written in rust
* inspect changes
* (un)stage files
* commit
* revert/reset files
* commit changes
* async [input polling](assets/perf_compare.jpg) and
* async git API for fluid control
@ -48,7 +49,6 @@ gitui
# todo for 0.1 (first release)
* [ ] discard untracked files (remove)
* [ ] (un)staging selected hunks
* [ ] publish as homebrew-tap
* [ ] release on crates.io

View file

@ -102,6 +102,7 @@ pub fn index_reset(path: &Path) -> bool {
let repo = repo();
let mut checkout_opts = CheckoutBuilder::new();
checkout_opts.remove_untracked(true);
checkout_opts.path(&path).force();
if let Ok(_) = repo.checkout_head(Some(&mut checkout_opts)) {