diff --git a/README.md b/README.md index 40f3eaa2..caea2d09 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/asyncgit/src/sync/utils.rs b/asyncgit/src/sync/utils.rs index 05fa8cfe..3d8117be 100644 --- a/asyncgit/src/sync/utils.rs +++ b/asyncgit/src/sync/utils.rs @@ -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)) {