Previously the `DebouncerInner` struct was made public to allow the
tests to happen (they initialize it directly), but to keep it closer
to the original, let's keep unit tests this time.
Also I validated that both tests are the same.
- instrument snapshot creation to assure we see errors (which are ignored in code)
- move tests for public `entry` types into integration tests
- rename `OperationType` to `OperationKind` as it's more commmon in Rust
- Use `Copy` where possible
- streamline implementation: remove clones and allocations, without going zero-copy
- Prefer direct calls to traits to avoid `write!("{}")` just to invoke a trait fmt implementation
- avoid `pub` when `pub(crate)` will do
- strong type for created_at
Previously, roots were always empty and it was unclear what the purpose
of the customization was.
It's probably best to re-add it along with a test maybe.
While at it, remove the docs as they are referring to the original source code.
Tests should help to understand how it is supposed to work.
Note that the copy is verbatim and modifications will happen in a separate commit,
along with the necessary license declarations.
This could be supported, but would require more changes to get right.
For now, fail gracefully instead of failing strangely because we don't
watch everything that needs watching.
There are many filesystem events that are not touching files which
could be ignored.
Now we detect this case in advance and only open the project repository
if we know there are files to check for their ignore state.
That way, there should overall be less IO, which is good for performance
particularly on Windows.
* upstream/master: (85 commits)
History and minor UI fixes (#3797)
History fixes (#3796)
make GitGuardian happy
bump playwright version
add vitest exclude for node_modules
Remove unused exports from ipc
Update auth.ts to use absolute import
Use correct invoke function
setup for async tasks on oplog update
formatting
save and restore the gitbutler/integration branch
remove unneccessary CSPs
Fix ollama request security
fix: forgot the port
feat: Set default snapshot lines threshold to 20 when undefined
fix: Updated connect-src to allow local connections for ollama
Minor tweaks to CSS and use real branch name
Unmount history component when hidden
Fix bug leaving PR button visible
Small refactor of history component
...
This is being replaced by the new `ops` module
Along with the respective tests. There were only session/deletas related assertions in the watcher tests
This probably means the raciness is not due concurrency introduced by filesystem events,
which leads me to think that having great 'disk-IO-hygiene` should improve things.'
- rename feature to `windows`
- remove unused config key from `Cargo.toml`, unfortunately `cfg` isn't available for everything
- make sure feature is toggled on on CI when checking and when publishing
By increasing the window size for collecting filesystem events,
knowing that each event is processed in parallel, we might be lucky
and that already reduces the likelyhood of clashes.
It's an experiment though.
On Unix, run with:
`LOG_LEVEL=debug pnpm tauri dev --features adapt-to-windows`
Note that the comment above 'deltas' merely removed, as it wasn't actionable
without changing the frontend, which can probably already deal with
multiple of these.
Now that types are better understood though, it was straightforward to
change the type of `file_path` to not be a string, which now is even
clearer of a necessity thanks to the `tauri`-independent `watcher` crate.
Also, remove a comment related to the lack of worktree support.
It now fails gracefully, and that will come up again if support should be added.