jesseduffield / jesseduffield/lazygit
discard/reset on folder can cause errors
- Dominant language
- Go
- Stars
- 82.4k
- Forks
- 3k
- Avg merge
- 2d 18h
- Merged PRs (30d)
- 19
Description
**Describe the bug**
This only seems to apply to YAML files (extensions .unity, .asset) created in Unity3D. To make sure there are no handles to those files, every related program was closed first.
Using a hard reset on a folder from the Files panel (i.e. D > h) causes a list of errors in the form:
```
error: unable to unlink old 'path/to/file1': Invalid argument
error: unable to unlink old 'path/to/file2': Invalid argument
fatal: Could not reset index file to revision 'HEAD'
```
Using a hard reset on the same folder via the Local Branches panel (g > h) or directly from the command line does not cause those errors.
Same applies to using Discard Changes on a folder as opposed to individual files.
**Expected behavior**
Discard all the changes without issues
**Version info:**
commit=367b0d331836c90c015bf0c45f88612f3d94d08a, build date=2022-07-20T09:27:56Z, build source=binaryRelease, version=0.35, os=windows, arch=amd64
git version 2.37.3.windows.1
Contributor guide
Assessment
This issue has not been assessed yet.