mirror of
https://github.com/gitui-org/gitui
synced 2026-05-24 09:28:21 +00:00
suport resetting untracked files
This commit is contained in:
parent
7d76db09cc
commit
cf4c4721dc
2 changed files with 3 additions and 2 deletions
|
|
@ -14,7 +14,8 @@ blazing fast terminal-ui for git written in rust
|
||||||
|
|
||||||
* inspect changes
|
* inspect changes
|
||||||
* (un)stage files
|
* (un)stage files
|
||||||
* commit
|
* revert/reset files
|
||||||
|
* commit changes
|
||||||
* async [input polling](assets/perf_compare.jpg) and
|
* async [input polling](assets/perf_compare.jpg) and
|
||||||
* async git API for fluid control
|
* async git API for fluid control
|
||||||
|
|
||||||
|
|
@ -48,7 +49,6 @@ gitui
|
||||||
|
|
||||||
# todo for 0.1 (first release)
|
# todo for 0.1 (first release)
|
||||||
|
|
||||||
* [ ] discard untracked files (remove)
|
|
||||||
* [ ] (un)staging selected hunks
|
* [ ] (un)staging selected hunks
|
||||||
* [ ] publish as homebrew-tap
|
* [ ] publish as homebrew-tap
|
||||||
* [ ] release on crates.io
|
* [ ] release on crates.io
|
||||||
|
|
|
||||||
|
|
@ -102,6 +102,7 @@ pub fn index_reset(path: &Path) -> bool {
|
||||||
let repo = repo();
|
let repo = repo();
|
||||||
|
|
||||||
let mut checkout_opts = CheckoutBuilder::new();
|
let mut checkout_opts = CheckoutBuilder::new();
|
||||||
|
checkout_opts.remove_untracked(true);
|
||||||
checkout_opts.path(&path).force();
|
checkout_opts.path(&path).force();
|
||||||
|
|
||||||
if let Ok(_) = repo.checkout_head(Some(&mut checkout_opts)) {
|
if let Ok(_) = repo.checkout_head(Some(&mut checkout_opts)) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue