Delete file not listed
See original GitHub issueWhat do I get:
await git.listFiles({fs, dir});
// ['foo', 'bar', 'baz'];
await git.remove({fs, dir, 'foo'});
await git.listFiles({fs, dir});
// ['bar', 'baz'];
// should be [['foo', 'bar', 'baz'];
await pfs.readDir(dir);
// ['foo', 'bar', 'baz']
await git.status({fs, dir: '/test', filepath: 'foo'})
// undocumented "*undeleted"
await git.add({fs, dir: '/test', filepath: 'foo'})
await git.status({fs, dir: '/test', filepath: 'foo'})
// "unmodified"
await git.remove({fs, dir, 'foo'});
await pfs.unlink('/test/foo');
await git.status({fs, dir: '/test', filepath: 'foo'})
// deleted which is fine but
await git.listFiles({fs, dir});
// ['bar', 'baz'];
// should be [['foo', 'bar', 'baz'];
What I expect:
the file should always be on the list because it’s not yet committed.
When I call fs.unlink('/test/foo');
the file have correct status deleted but it’s not one the list.
Issue Analytics
- State:
- Created 5 years ago
- Comments:14 (14 by maintainers)
Top Results From Across the Web
Can't delete file, 'could not find this file' please help
1. Close any open programs and try deleting the file again. · 2. Press the Windows key + R and type cmd to...
Read more >Fix “Could Not Find This Item” When Deleting in Windows
Use Command Prompt To Fix “Could Not Find This Item” · Rename The File Using Command Prompt Before Deleting It · Delete Files...
Read more >How to Fix the "Item Not Found" Windows Error When Deleting ...
First way: Right click on the folder/file, and click properties. Screenshot-2022-04-14-231044. Here, you will get the directory address.
Read more >[Fix] “Could not find this item” When Deleting a File or Folder ...
Method 1: Delete the file or folder from Command Prompt · Press and hold the Shift key and right click on the file...
Read more >6 Ways to Fix the “Could Not Find This Item” Deletion Error in ...
1. Restart Windows Explorer · 2. Zip Up the Item and Then Delete the Zipped File · 3. Delete the File Using PowerShell...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Yeah… so
readObject
is still better for say a file explorer UI or searching for a particular file, but for the simple case of “just list all the files in the commit” it would make sense to have it built in, because listing all the files is going to be maximally inefficient regardless, but still needed for a lot of common tasks - like git merge most likely.I think that there is no problem in doing extra step to delete the file but there should be example how to list all the files in FAQ or maybe update the api with extra parameter that will indicate that it should show files from commit/HEAD.