altsem / gitu

A TUI Git client inspired by Magit
MIT License
1.7k stars 88 forks source link

Discarding staged new file is not working #114

Closed golden-expiriensu closed 4 months ago

golden-expiriensu commented 4 months ago

Reproduction:

 danil   fix/stash-worktree  ~/offw/rust/gitu  echo "meowmeow" > cat.txt
 danil   fix/stash-worktree ?:1  ~/offw/rust/gitu  gitu -k "jsjKy<enter>"

Yields error: Screenshot from 2024-04-05 13-32-21

I think we want to git restore --staged <file> followed by std::fs::remove_file(file), right?