Skip to content

Commit 1f9af9f

Browse files
docs: note LightningFS flush() limitation (#2291)
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 556ba32 commit 1f9af9f

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,10 @@ git.clone({ fs, http, dir, url: 'https://github.com/isomorphic-git/lightning-fs'
7777
```
7878

7979
If you're using `isomorphic-git` in the browser, you'll need something that emulates the `fs` API.
80-
The easiest to setup and most performant library is [LightningFS](https://github.com/isomorphic-git/lightning-fs) which is written and maintained by the same author and is part of the `isomorphic-git` suite.
80+
The easiest to setup and most performant library is [LightningFS](https://github.com/isomorphic-git/lightning-fs) which is written and maintained by the same author and is part of the `isomorphic-git` suite.
81+
82+
⚠️ LightningFS may apply file operations out of order, which can lead to repository corruption if the process crashes. You can mitigate this by calling `fs.flush()` after Git operations.
83+
8184
If LightningFS doesn't meet your requirements, isomorphic-git should also work with [ZenFS](https://github.com/zen-fs/core) and [Filer](https://github.com/filerjs/filer).
8285
Instead of `isomorphic-git/http/node` this time import `isomorphic-git/http/web`:
8386

0 commit comments

Comments
 (0)